Write a query to get 2nd maximum salary in an employee table ?
Answer Posted / surajit pathak
select * from emp e1
where 2>(select count(1) from emp e2
where e2.sal>e1.sal)
order by sal desc
| Is This Answer Correct ? | 1 Yes | 4 No |
Post New Answer View All Answers
What is range partitioning?
How to read xml file in oracle pl sql?
Define SQL and state the differences between SQL and other conventional programming Languages?
Explain ttitle and btitle.
How many types of keys are there in sql?
What is on delete set null?
what is rdbms? : Sql dba
How to run sql statements through the web interface?
When can we use the where clause and the having clause?
How do I edit a stored procedure?
Explain how to use transactions efficiently : transact sql
What are the triggers associated with image items?
What is the usage of distinct keyword?
What are stuff and replace function?
What is user defined functions?