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
How to look at the current sql*plus system settings?
What is trigger types in sql?
What can sql server reporting services do?
Explain select statements in sql?
Is clustered index a primary key?
What is sql stand for?
What are dml commands?
what is datawarehouse? : Sql dba
What are the types of join and explain each?
What is pl sql commands?
Is it important to partition hard disk?
what does it mean to have quoted_identifier on? : Sql dba
What is sql resultset?
What is pl sql variable?
how to add a new column to an existing table in mysql? : Sql dba