how to calcuate the second highest salary of he employee
Answer Posted / ramya p
SELECT DISTINCT (sal),deptno FROM emp a
WHERE &N = (SELECT COUNT (DISTINCT (b.sal)) FROM emp b
WHERE a.sal<=b.sal)
N is the Nth highest salary you want to print. In this case
N=2
Is This Answer Correct ? | 7 Yes | 1 No |
Post New Answer View All Answers
The select into statement is most often used to create backup copies of tables or for archiving records?
What is error ora-01000: maximum open cursors exceeded
What is sql architecture?
What are the different schemas objects that can be created using pl/sql?
How does a covering index work?
how to get help information from the server? : Sql dba
what is the maximum length of a table name, database name, and fieldname in mysql? : Sql dba
How many unique keys can a table have?
what is uncommittable transactions? : Transact sql
What is structural independence and why is it important?
What is the sql*loader? : aql loader
What is sql server and ase?
What is coalesce in sql?
What does inner join mean?
What are the different types of sql commands?