how to find nth highest salary
Answer Posted / bharath
select distinct(sal) from emp a where 3 = (select
count(distinct(sal)) from emp b where a.sal<= b.sal)
replace 3 by 2 for second highest...
Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
What is query optimizer in sql server?
What are the two modes of authentication in sql server?
What is the command used to check locks in microsoft sql server?
Define synonym?
What is buffer cash and log cache in sql server?
Explain various data region available in ssrs with their use?
How to create a user to access a database in ms sql server using "create user" statements?
What do you understand by sql server agent?
How to create new tables with "create table" statements in ms sql server?
Why functions are used in sql server?
What happens when converting big values to integers?
What are the different types of stored procedures?
What is inline variable assignment?
How do I find the default sql server instance?
How to create user defined functions with parameters?