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
 SQL Server 2000 Forums
 Transact-SQL (2000)
 just want to know query

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2005-01-25 : 08:16:19
Pankaj writes "how to find out the second highest salary of the employee from the employee table."

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2005-01-25 : 08:27:38
select top 1 * from
(select top 2 * from Employees order by salary) t1 order by t1.salary desc

Go with the flow & have fun! Else fight the flow
Go to Top of Page

AndyB13
Aged Yak Warrior

583 Posts

Posted - 2005-01-25 : 08:32:26
Looks like schools out!
Go to Top of Page
   

- Advertisement -