Write a query to find second highest salary of an employee.
Answer Posted / om patel
select (distinct(a.sal) from emp e where rownum=&N(select
count(distinct(b.sal)) from emp b where a.sal<=b.sal)
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
How do you explain an index number?
How do I remove duplicates in two columns?
Why coalesce is used in sql?
What is sap sql anywhere?
What are different types of statements supported by sql?
what are tables and fields? : Sql dba
what are the differences among rownum, rank and dense_rank? : Sql dba
what are numeric data types? : Sql dba
how to use in conditions? : Sql dba
Can we call procedure in select statement?
Can we use the cursor's to create the collection in PL/SQL?
What is meant by temporal data?
what is a relationship and what are they? : Sql dba
What is sql lookup?
What are the most important characteristics of pl/sql?