how to find the second highest salary from emp table?
Answer Posted / neeraj
SELECT DISTINCT(SAL) FROM EMP
WHERE SAL=(SELECT MIN(SAL) FROM (SELECT SAL FROM EMP ORDER
BY SAL DESC)
WHERE ROWNUM<=2);
Is This Answer Correct ? | 2 Yes | 2 No |
Post New Answer View All Answers
Why indexing is needed?
What is difference between stored procedures and application procedures?
How to Declare Fixed Length String Value In PL SQL
Is it possible to include an insert statement on the same table to which the trigger is assigned?
What is multiple columns?
what is column? : Sql dba
What is normalization? How many normalization forms are there?
What are different types of queries in sql?
Can we use ddl statements in stored procedure?
How do temporal tables work?
What mean sql?
What trigger means?
What is a composite primary key?
Can a composite key be null?
Is it possible to remove child records without removing master table records...the two having pk,fk relationship?