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 / kb
select top 1 * from emp
where sal < (select max(sal)from emp)
order by sal desc
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
what are the different types of SSRS reports?
Explain different types of lock modes in sql server 2000?
What happens when transaction log is full?
What is a select query statement in ms sql server?
What do you mean by a Composite primary key?
How does index makes search faster?
What is field with example?
Can you please explain the difference between function and stored procedure?
What are the different sql server versions?
What are the system database in sql server 2008?
How to change the system date and time from SQL Plus Terminal ?
What are the fixed server level roles? : sql server security
What is collation sensitivity?
What is use of dbcc commands?
How we can compare two database data?