How to display last record entered with select query ??

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sheenaa
    New Member
    • Apr 2007
    • 20

    How to display last record entered with select query ??

    Hi,

    I want to display the last recorded record in the database of SQL SERVER 2005.

    How can i display it with the select query in the grid view...

    The database contains the information which is general contact details:

    Name
    Address
    Phone
    Email

    How can i display on the submit click event that ur record is inserted and display details in gridview .

    How to write it in select query identity??
    I have already an Identity Column in the Table structure.
  • cripton
    New Member
    • Mar 2008
    • 3

    #2
    try this...
    if they are sort by name try this syntax

    Name
    Address
    Phone
    Email

    select top 1 * from TABLE order by Name Desc

    hope this will help

    Comment

    • debasisdas
      Recognized Expert Expert
      • Dec 2006
      • 8119

      #3
      Originally posted by sheenaa
      Hi,

      I want to display the last recorded record in the database of SQL SERVER 2005.
      How can i display it with the select query in the grid view...
      The database contains the information which is general contact details:
      You want to display from a database or from a table ?

      I hope you know the basic difference between the two.

      Comment

      Working...