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

Answer Posted / v rajkumar

select salary from Emp a where 4 = (select count(distinct
(salary)) from Emp b where b.salary>= a.salary)

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between implicit and explicit transaction?

722


Which autogrowth database setting is good?

783


Is it possible for a stored procedure to call itself or recursive stored procedure?

714


What is precedence constraint?

709


When we should use and scope of @@identity?

711






What is the sql case statement used for? Explain with an example?

706


What is the difference between set and select?

732


What are the extra roles available in msdb? : sql server security

831


How does stuff differ from the replace function?

730


Ways to improve the performance of a SQL Azure Database?

115


Which is better statement or preparedstatement?

690


What is update locks?

654


What is conditional split?

716


How to truncate the log in sql server 2012? : sql server database administration

766


What is the difference between varchar and nvarchar datatypes?

754