By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,831 Members | 1,024 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,831 IT Pros & Developers. It's quick & easy.

How to display last record entered with select query ??

P: 20
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.
Apr 27 '07 #1
Share this Question
Share on Google+
2 Replies


P: 3
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
Mar 14 '08 #2

debasisdas
Expert 5K+
P: 8,127
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.
Mar 14 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.