how to find the second highest salary from emp table?
Answer Posted / sagar
if the salary is simple non-duplicate salary, you can use
the below queries:
select max(sal) from emp where sal != (select max(sal) from emp)
you can also try
select sal from (select * from emp order by sal desc) where
rownum = 2
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is the primary use of normalization?
Why is sql important?
What is left join in postgresql?
What port does sql server use?
What is a file delimiter?
What is scalar data type in pl sql?
How can we connect an Android App to an Oracle database and use the PL/SQL procedural code?
Which command is used to delete a package?
What is delimiter in pl sql?
What is the need of merge statement?
How do I count duplicates in sql?
What is scalar and vector?
How you can copy a file to file content and file to pl/sql table in advance pl/sql?
What is trigger explain it?
what are the disadvantages of mysql? : Sql dba