i need 5 heightst salary in emp table

Posted by Cnpphani under Sql Server on 3/22/2009 | Views : 1338 | Status : [Member] | Replies : 2
i need 5 heightst salary in emp table give me query




Responses

Posted by: Neeks on: 3/22/2009 [Member] Bronze

Up
0
Down
SELECT TOP (5) * FROM Test ORDER BY salary DESC

Cnpphani, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Gaddad on: 3/23/2009 [Member] Starter

Up
0
Down
select top 1 *
from
(
select top 5 *
from employee
order by sal desc
) a order by sal

Cnpphani, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response