Click here to Skip to main content
15,795,887 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to use TOP(1) keyword in MS Access query.

select * TOP(1) from mytable orderby mycolumn desc;

this querry gives me error;

Any other alternate to implement this code;

1 solution

Remove the "*", use this "select top(1) mycol1 from mytable order by mycol1 desc;"
Share this answer
markand911 7-Sep-10 1:20am    
Thanx sushant for your response. but its not working
select TOP(1) from mytable orderby mycolumn desc
Sushant Joshi 7-Sep-10 12:44pm    
Markand, Put the column names after top(1), like: Select top(1) column1 from mytable order by column1 desc;

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