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 the difference between rollback and rollback to statements?
how do you tune the slow running queries in oracle db , explain the methodology
What is trigger in sql? Explain
Can we delete column in sql?
How does postgresql compare to "nosql"?
Which nosql database is best?
Differentiate between % rowtype and type record.
What is meant by temporal data?
How many scalar data types are supported in pl/sql?
Explian rowid, rownum?
What is cursor in pl sql?
discuss about myisam key cache. : Sql dba
how to shut down the server with 'mysqladmin'? : Sql dba
what is the difference between cluster and non cluster index? : Sql dba
What view means?