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
how to convert numeric values to character strings? : Sql dba
Why is stored procedure faster than query?
Which join is like an inner join?
What is record in pl sql?
What is sql query optimization?
what is subquery? : Sql dba
What is meaning of <> in sql?
What is left join example?
What is difference between table and view?
Is primary key clustered index?
What is the starting oracle error number? What is meant by forward declaration in functions?
how to fetch common records from two tables? : Sql dba
What is the purpose of primary key?
How do I get sql certification?
What are secondary keys?