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
Is there a way to automate sql execution from the command-line, batch job or shell script?
how to convert character strings to dates? : Sql dba
What are the limitations of sql express?
What are the parts of a sql statement?
What is trigger explain it?
what are the differences between char and varchar? : Sql dba
Is natural join and inner join same?
What is difference between mysql and postgresql?
What are expressions?
how many columns can be used for creating index? : Sql dba
Why do we go for stored procedures?
Can we join more than 2 tables in sql?
When you have to use a default "rollback to" savepoint of plvlog?
What is the use of function in sql?
What is a sql*loader control file?