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 / lince
select top 1 * from (select distinct top 2 * from emp order by sal desc)t order by sal asc
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Which are the important points to note when multilanguage data is stored in a table?
Can I work with several databases simultaneously? : sql server management studio
Can I run multiple instances of sql server 2000 at the same time on one computer?
Can you name some of the dml commands in sql?
Explain transaction server isolation?
What is buffer cash in sql server?
How to create a new table in a given schema?
What are data files?
What is log shipping?
What are subqueries in sql server? Explain its properties.
What are .mdf files?
Give me a SQL Query to find out the second largest company?
Where in ms sql server is ’100’ equal to ‘0’?
You want your report to display a hyperlink that will take users to your intranet. How do you configure such a hyperlink?
What is a dbms wizard?