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
Why partition by is used in sql?
what are the advantages and disadvantages of cascading style sheets? : Sql dba
What is a full join?
What is assignment operator in pl sql?
What is dynamic sql in pl sql?
Can you call pl/sql package functions from within a fast formula?
State few characteristics of pl/sql?
The select into statement is most often used to create backup copies of tables or for archiving records?
table structure: ---------------- col1 col2 ----- ----- 01-mar-2012 11:12:46 01-mar-2012 11:12:10 01-mar-2012 11:12:46 01-mar-2012 11:11:23 Write a query to display the result as shown below: col1 col2 ----- ----- 01-mar-2012 11:12:46 01-mar-2012 11:12:10
What is the difference between syntax error and runtime error?
How to get unique records from a table?
What is a loop in sql?
Explain what is a column in a table?
What trigger means?
How many types of primary keys are there?