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 integrity in sql?
How do I find duplicates in sql?
What is union?
How do I run a sql trace?
What is embedded sql what are its advantages?
How do you optimize a query?
how to analyze tables with 'mysqlcheck'? : Sql dba
Where is all the data on the internet stored?
What is user in sql?
What are sql built in functions?
Why do we create stored procedures & functions in pl/sql and how are they different?
Can ddl statements be used in pl/sql?
What is the usage of nvl function?
What are tables and fields?
What is numeric function sql?