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 difference between inner join and cross join?
What are two statement types in sql?
What is the difference between left outer join and left join?
How do I partition in sql?
Does truncate need commit?
what is error ora-03113: end-of-file on communication channel?
What is a database? Explain
What is clause?
Which kind of parameters cannot have a default value in pl sql?
What is natural join in sql?
Describe sql comments?
How do sql databases work?
Is join same as left join?
What is sql constant?
What is indexing in sql and its types?