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
Is it possible to pass parameters to triggers?
Is it possible for a table to have more than one foreign key?
What are sql indexes?
Can we use pl sql in sql server?
How can you save or place your msg in a table?
Can we rename a column in the output of sql query?
Explain the uses of control file.
How does join work in sql?
What is coalesce in sql?
How do I count records in sql?
What is procedure explain with program?
What are the topics in pl sql?
Does postgresql run on the cloud?
Write the alter statement to enable all the triggers on the t.students table.
Differentiate between % rowtype and type record.