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
When should I use nosql database?
What is use of term?
What is sql key?
What are the most important characteristics of pl/sql?
Can you rollback after commit?
Can %notfound return null after a fetch?
What is mutating table error?
What is an invalid partition table?
What are packages in pl sql and also explain its advantages?
Lookups are a key component in sql server integration services (ssis). Explain its purpose?
how can we optimize or increase the speed of a mysql select query? : Sql dba
Enlist some predefined exceptions?
What are the types of records?
Which query operators in sql is used for pattern matching?
What is dml statement?