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 difference between line feed ( ) and carriage return ( )?
Write SQL queries on Self Join and Inner Join.
my name is sejal I have cleared the sbi clerk exam. I am BCA graduate My favorite subject RDBMS Relational database management system. so please send me rRDBMS related interview questions
explain what is raid and what are different types of raid configurations? : Sql server database administration
what are the disadvantages of cursors? : Sql server database administration
What is database isolation in sql server? : sql server database administration
What is an identity column in insert statements?
How do I find the sql server instance name?
What is data source document?
What is catalog views?
tell me what is blocking and how would you troubleshoot it? : Sql server database administration
How do I trace a query in sql server?
What is the latest version of microsoft sql server?
Which tools are available to manage SQL Azure databases and servers?
Is there any performance difference between if exists (select null from table) and if exists (select 1 from table)?