Write a query to get 2nd maximum salary in an employee table ?
Answer Posted / anil_abbireddy
select * from emp a where 2=(select count(distinct sal)
from emp b where a.sal<=b.sal)
| Is This Answer Correct ? | 44 Yes | 12 No |
Post New Answer View All Answers
What is the difference between a primary key and a unique key?
what are date and time intervals? : Sql dba
If i can use sys.check_constraints to display my constraints from my database using sql server 2005, how can i display then if i am using sql server 2000????
Is sql port 1433 encrypted?
What plvcmt and plvrb does in pl/sql?
What are analytical functions in sql?
what is the difference between blob and text? : Sql dba
How to run pl/sql statements in sql*plus?
What is not equal in sql?
what are date and time functions in mysql? : Sql dba
What is the difference between the sql*loader and import utilities? : aql loader
What are local and global variables and their differences?
what is blob? : Sql dba
what is the maximum length of a table name, database name, and fieldname in mysql? : Sql dba
what does it mean to have quoted_identifier on? What are the implications of having it off? : Sql dba