how to find the second highest salary from emp table?
Answer Posted / vijay kintali
select e1.ename,e1.sal from emp e1 where n=(select count
(distinct e2.sal) from emp e2 where e1.sal<=e2.sal);
Note:n here is nth highest salary.......
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Is left join and outer join same?
What is sql*plus?
how do you control the max size of a heap table? : Sql dba
Is microsoft sql free?
How do you select unique values in sql?
Explain scalar functions in sql?
What is pl sql architecture?
What is user defined functions?
What is procedure and function in sql?
What is rowtype?
how to create a new table in mysql? : Sql dba
explain normalization concept? : Sql dba
What are %type and %rowtype for?
Why do we create stored procedures & functions in pl/sql and how are they different?
Is there a 64 bit version of ssms?