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
Is mysql better than sql server?
What is an identity column in insert statements?
What options are there to delete rows on the publisher and not on the subscriber? : sql server replication
Explain foreign key in sql server?
What is wrong with sql server client libarary dll, ntwdblib.dll?
Explain the steps to use transact-sql cursor?
What is the current limitation of the size of SQL Azure DB?
How do indexes help, types?
my name is sejal I have cleared the sbi clerk exam. I am BCA graduate My favorite subject RDBMS Relational database management system. so please send me rRDBMS related interview questions
What is rank function?
Can we check locks in database? If so, how can we do this lock check?
Explain database normalization?
Difference Between ORDER BY Clause and GROUP BY Clause in SQL?
what does the automatic recovery do? : Sql server administration
Once setting replication, can you have distributor on sql server 2005, publisher of sql server 2008?