Please get the 4 th maximum salary from a table without
using any sql keyword (TOP,MAX are mot allowed)

Answer Posted / veeresh kethari

with SalCTE (EMPID,Ename,Sal,Num)as

(select *,row_number() over(order by sal desc) num from emp)

select * from SalCTE where Num=4

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to use clusters?

690


What is mean by clustered index and non clustered index, give syntax of creation? : sql server database administration

772


What is the purpose of grouping data in a report?

713


What is sql server profiler trace data file?

778


Can you create a logon trigger in sql server 2005 express edition?

778






how to take backup bcp out for a column in table in sql server?

1822


What are drillthrough reports?

128


How to start and end transact-sql statements?

740


How do you delete a data source?

747


How to create a view using data from another view?

721


1)what is the difference between Reinitializing a Subscription and synchronization the subscription? 2)when to use reinitializing ? 3)when to use synchronization? 4)when adding table or deleting a table what to do?(reinz.. or syn) 5)when adding a column what to do?

1721


what are questions asked in TCS for database tester (sqlserver)for 2-3 exp?

5667


What is the difference between the application object and session object?

792


what are user defined datatypes? : Sql server database administration

709


Write down the syntax and an example for create, rename and delete index?

714