how to find the second highest salary from emp table?
Answer Posted / abhi
select max(sal)from emp where sal <> (select max(sal)from emp)
OR
select max(sal)from emp where sal < (select max(sal)from emp)
OR
select max(sal)from emp where sal != (select max(sal)from emp)
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
What is a file delimiter?
Enlist the advantages of sql.
What are all different types of collation sensitivity?
what is the stuff function and how does it differ from the replace function? : Sql dba
What trigger means?
Can we rollback delete command?
How to connect a sql*plus session to an oracle server?
What is keys and its types?
What kind of join is join?
What are pl sql procedures?
Does truncate need commit?
List the various privileges that a user can grant to another user?
Is sql microsoft?
What is a boolean in sql?
How do you write an inner join query?