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
How to use clusters?
What is mean by clustered index and non clustered index, give syntax of creation? : sql server database administration
What is the purpose of grouping data in a report?
What is sql server profiler trace data file?
Can you create a logon trigger in sql server 2005 express edition?
how to take backup bcp out for a column in table in sql server?
What are drillthrough reports?
How to start and end transact-sql statements?
How do you delete a data source?
How to create a view using data from another view?
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?
what are questions asked in TCS for database tester (sqlserver)for 2-3 exp?
What is the difference between the application object and session object?
what are user defined datatypes? : Sql server database administration
Write down the syntax and an example for create, rename and delete index?