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
 General SQL Server Forums
 New to SQL Server Programming
 How to get a TOP10 list from a table?

Author  Topic 

sfs00784
Starting Member

4 Posts

Posted - 2007-12-17 : 03:18:45
SELECT Item.Unit_price
FROM Item
ORDER BY Item.Unit_price DESC

How can I display the Top10 only? thanks.

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2007-12-17 : 03:41:08
SELECT Top 10 Item.Unit_price
FROM Item
ORDER BY Item.Unit_price DESC


Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

sfs00784
Starting Member

4 Posts

Posted - 2007-12-17 : 04:36:36
quote:
Originally posted by madhivanan

SELECT Top 10 Item.Unit_price
FROM Item
ORDER BY Item.Unit_price DESC



Oh thanks, don't realize there is TOP 10 command.
Go to Top of Page
   

- Advertisement -