Write a query to get 2nd maximum salary in an employee table ?
Answer Posted / hasnain hameed
select max(salary)
from emp
where salary < (select max(salary) from emp)
order by salary desc;
i think this is correct answer all of above because it take
less time to execute. retrive the answer quickly.
| Is This Answer Correct ? | 6 Yes | 4 No |
Post New Answer View All Answers
what is a database lock ? : Sql dba
what does it mean to have quoted_identifier on? What are the implications of having it off? : Sql dba
what are aggregate and scalar functions? : Sql dba
What is trigger in sql? Explain
Why do we need view in sql?
What are sql queries used for?
What is the difference between a primary key and a unique key?
what is auto increment? : Sql dba
What is AUTH_ID and AUTH_USER in pl/sql ?
How do you determine the current isolation level? : Transact sql
what happens when the column is set to auto increment and you reach the maximum value for that table? : Sql dba
what is the difference between join and union? : Sql dba
Can you select everything, but 1 or 2 fields, without writer's cramp?
What is natural join in sql?
What is the unique index?