Write a query to get 2nd maximum salary in an employee table ?
Answer Posted / omkar hendre
select distinct(sal) from emp a where 2=(select count(distinct(sal)) from emp b where a.sal <=b.sal)
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How do I run a sql script?
what are the advantages a stored procedure? : Sql dba
What are actual parameters and formal parameters?
what does it mean to have quoted_identifier on? What are the implications of having it off? : Sql dba
Explain clause in sql?
What is out parameter used for eventhough return statement can also be used in pl/sql?
How do you drop a trigger?
What is the use of prepared statement?
What are sql injection vulnerabilities?
Which one is better subquery or joins?
what is the command line end user interface - mysql? : Sql dba
Can a view be mutating? If yes, then how?
Is sql scripting language?
What is function and procedure in pl sql?
What is indexing in sql and its types?