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 is normalization? How many normalization forms are there?
Write a unique difference between a function and a stored procedure.
What is an example of translating a date into julian format?
How to pronounce postgresql?
What is the difference between joins?
What is keys and its types?
what is an index? : Sql dba
What is a sql trace file?
What is the purpose of the sql select top clause?
What are different clauses used in sql?
difference between anonymous blocks and sub-programs.
What are the indexing methods?
What are different sql data types?
Why is theta join required?
Is pl sql a scripting language?