Click here to Skip to main content
15,920,053 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
is there anyway to select * From Table by the greatest date in the table ?
Posted

Are you looking for something like this?

SQL
SELECT MAX(MyDate) FROM Table


Hope it helps
 
Share this answer
 
Yes, The_Mask_of_Zorro_ is right. You may use MAX. or you may use below way

SQL
SELECT TOP 1 [DateColumnName] FROM [TableName] ORDER BY [DateColumnName] DESC
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900