how to find the second highest salary from emp table?
Answer Posted / shalina bajaj
select sal from emp a
where $number = (select count(distinct(sal))
from emp b
where a.sal <= b.sal);
| Is This Answer Correct ? | 11 Yes | 17 No |
Post New Answer View All Answers
How consistent is the view of the data between and within multiple sessions, transactions or statements ?
what are the limitations of identity column? : Transact sql
What is %rowtype in pl sql?
Which table is left in left join?
Can a view be mutating? If yes, then how?
How can we debug in PL/SQL?
what is 'trigger' in sql? : Sql dba
table structure: ---------------- col1 col2 ----- ----- 01-mar-2012 11:12:46 01-mar-2012 11:12:10 01-mar-2012 11:12:46 01-mar-2012 11:11:23 Write a query to display the result as shown below: col1 col2 ----- ----- 01-mar-2012 11:12:46 01-mar-2012 11:12:10
What is the function that is used to transfer a pl/sql table log to a database table?
How do sql triggers work?
How many types of triggers exist in pl/sql?
how mysql optimizes distinct? : Sql dba
Write a sql select query that only returns each name only once from a table?
define sql insert statement ? : Sql dba
What is sqlca in db2?