how to get second highest salary in SQL(as/4000
Answer Posted / amedela chandra sekhar
SQL> select * from emp where sal=(select max(sal) from emp
2 where sal<(select max(sal)from emp));
EMPNO ENAME JOB MGR HIREDATE
SAL COMM
---------- ---------- --------- ---------- ---------
---------- ----------
DEPTNO
----------
7788 SCOTT ANALYST 7566 19-APR-87 3000
20
7902 FORD ANALYST 7566 03-DEC-81 3000
20
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What are the packages in pl sql?
What is varchar sql?
what is query cache in mysql? : Sql dba
Define commit, rollback and savepoint?
How sql query is executed?
How does sql developer connect to oracle database?
what are local and global variables and their differences? : Sql dba
How do you delete a table?
What found sql?
what is blob? : Sql dba
What is a trigger in sql?
What is dynamic sql in pl sql?
What are literals in sql server?
how to select unique records from a table? : Sql dba
what is the command used to fetch first 5 characters of the string? : Sql dba