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
Can I call a procedure inside a function?
How do I make my sql query run faster?
What version is sql?
What is pl sql script?
How to select all records from the table?
What is difference between ms sql and mysql?
What are the different types of dbms?
Define sql delete statement.
Which sql statement is used to delete data from a database?
How much does sqlite cost?
what is commit? : Sql dba
What are different types of functions in sql?
How many row comparison operators are used while working with a subquery?
what are the 'mysql' command line options? : Sql dba
What is program debugging?