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 stored procedure can you use to display the current processes? : Sql server administration
What is the command to change the recovery model?
What is equi join with example?
What is updatable resultset?
What are the types of database schema? : sql server analysis services, ssas
How to skip remaining statements in a loop block using continue statements?
Explain user defined views?
What is the difference between rank and dense_rank?
How to list all field names in the result set using mssql_field_name()?
Explain transaction isolation levels in sql server?
How do I view views in sql server?
How to query multiple tables jointly?
What are the differences in Clustering in SQL Server 2005 and 2008 or 2008 R2?
A trigger can reference objects outside the current database? State true or false.
How to use column default values in insert statements in ms sql server?