Click here to Skip to main content
15,899,026 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
i want to select my table sorted according to datetime field of the table..
the nearest datetime from now will be displayed first..

pls suggest some command...
Posted

Try:
SQL
SELECT * FROM myTable ORDER BY [date] DESC
 
Share this answer
 
Use ORDER BY[^]
SQL
SELECT * FROM user ORDER BY name


that's to quick basec sql questions you've posted you should really get a book or use Google before asking here. You'll get alot more help if you show you've tried to solve your problem yourself.
 
Share this answer
 
 
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