Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 sql query to get the highest number in a field

Author  Topic 

dbzmanwoodland2
Starting Member

1 Post

Posted - 2007-03-15 : 16:38:56
I have a 2000 records in a table, and in the ID field, I need to find the record with the highest number. What is the best query to do this?

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-03-15 : 16:39:39
SELECT MAX(ID)
FROM YourTable

Tara Kizer
http://weblogs.sqlteam.com/tarad/
Go to Top of Page
   

- Advertisement -