how to find the second highest salary from emp table?
Answer Posted / vinod dubey
select * from emp
where sal = (select max(sal) from emp where sal <>(select max(sal) from emp));
it will defiantly work
best of luck
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is the purpose of a secondary key?
What is lexical units in pl sql?
The in operator may be used if you know the exact value you want to return for at least one of the columns.
Define join and name different types of joins?
Why do we need cursor in pl sql?
What types of commands can be executed in sql*plus?
Can we update views in sql?
What is the maximum size of sqlite database?
what is the syntax used for partition in tsql? : Transact sql
how to use 'mysql' to run sql statements? : Sql dba
What are different types of keys?
What is trigger in sql?
How can you view the errors encountered in a trigger?
What is before and after trigger?
What is function and procedure in pl sql?