how to find nth highest salary
Answer Posted / sikindar
select * from emp where sal=(
SELECT DISTINCT (a.sal) FROM EMP A WHERE &N = (SELECT COUNT (DISTINCT (b.sal)) FROM EMP B WHERE a.sal<=b.sal));
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is subquery in sql?
Can we store videos inside the sql server table?
Where are sql server user names and passwords stored in sql server?
What is query optimization process?
What is the difference between the application object and session object?
What is SQL Azure?
What is Transparent Data Encryption?
Can you explain what are the restrictions applicable while creating views? : SQL Server Architecture
Why use update_statistics command in sql server?
Does windows server 2016 come with sql server?
What do you mean by data integrity?
How to access the deleted record of an event?
Difference between report and query parameter. Why do we need different type of parameter?
Can a synonym name of a table be used instead of a table name in a select statement?
How to create an identity column?