Find 2nd Highest salery in emp table
Select* from emp where &n=
select * count from emp where (salery >=emp.salery)
Enter n value 2
These query is correct or not. Tell me any other methods.
Answer Posted / asimananda
SELECT MAX(SAL) FROM EMP WHERE SAL < ( SELECT MAX(SAL) FROM
EMP )
| Is This Answer Correct ? | 7 Yes | 2 No |
Post New Answer View All Answers
how can u get last observation in an unknown dataset ?
How to find related tables in sql server?
How to stop a loop early with break statements in ms sql server?
What are the advantages of policy management?
What is role playing dimension with two examples? : sql server analysis services, ssas
What are the difference between clustered and a non-clustered index?
How to download and install microsoft .net framework version 2.0?
As per your opinion what are the five top responsibilities of a dba? : sql server database administration
How can windows applications connect to sql servers via odbc?
What is wrong with sql server client libarary dll, ntwdblib.dll?
List out the differences between global and local temp tables in sql server?
How can you list all the table constraints in a database?
Explain in brief how sql server enhances scalability of the database system?
What is an identity?
How to rename an existing column with sql server management studio?