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 / ramu
by using sub quries we can do
select * from emp where sal=select max(sal) from emp where
sal<select max(sal) from emp;
Is This Answer Correct ? | 1 Yes | 2 No |
Post New Answer View All Answers
What is a full text index?
What are actions, how many types of actions are there, explain with example? : sql server analysis services, ssas
What is the use of builtinadministrators group in sql server? : sql server security
Which sql server table is used to hold the stored procedure script?
How to compare the top two records using sql?
What is a matrix in ssrs?
How to create function without parameter in sql server?
Is the order of columns in the set clause important in ms sql server?
Explain what is log shipping?
What is the difference between count () and rowcount ()?
We need to perform what steps in the following order to work with a cursor?
What is the difference between substr and charindex in the sql server?
What are the High-Availability solutions in SQL Server and differentiate them briefly?
What are cursors stored procedures and triggers?
What is cursors?