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
tell me about various levels of constraint. : Sql dba
Is primary key always clustered index?
Why do we need cursors in pl sql?
What is exception? What are the types of exceptions?
Write a sql query to find the names of employees that begin with ‘a’?
What do you mean by query optimization?
Can you select everything, but 1 or 2 fields, without writer's cramp?
How do we use distinct statement? What is its use?
What is the sql query to display the current date?
What are the advantages of indexing?
What is a heap in sql?
how to show all tables with 'mysql'? : Sql dba
Is sql open source?
What is nested table in pl sql?
Are there any features that are decommissioned in 11g that are not present in 11g?