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)
 my question

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2007-01-29 : 10:21:16
Nukarapu writes "I want to retreive the fifth max sal from emp table"

AjarnMark
SQL Slashing Gunting Master

3246 Posts

Posted - 2007-01-29 : 10:21:16
You can search the site for an article titled "What's after TOP". It explains how to do this.
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-01-29 : 10:26:37
select top 1 salary from (select top 5 salary from emp order by salary desc) order by salary


Peter Larsson
Helsingborg, Sweden
Go to Top of Page
   

- Advertisement -