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
Can You Use A Stored Procedure To Provide Data To An Ssrs Report?
What is statement level trigger?
How do I find information about the install locations for the various instances running on a computer?
tell me what is blocking and how would you troubleshoot it? : Sql server database administration
Explain table valued parameters in sql server? Why tvp used?
Which tcp/ip port does the sql server run on? How can it be changed?
What are triggers? How do you invoke a trigger on demand?
What is the difference between clustered and a non-clustered index?
What is partitioned view?
What is tablesample?
You have a table with close to 100 million records recently, a huge amount of this data was updated now, various queries against this table have slowed down considerably what is the quickest option to remedy the situation?
Can an automatic recovery be initiated by a user?
What is SubQuery in SQL Server 2008
What is SQL Azure Federations?
Explain in brief how sql server enhances scalability of the database system?