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
Can you always create a cache of a report?
Explain trigger and its types?
What is Sqlpaging in SqlServer 2005 ?
What are ddl (data definition language) statements for tables in ms sql server?
What is wrong with sql server client libarary dll, ntwdblib.dll?
What are cursors? Explain the different types of cursors Enlist a few disadvantages of cursors.
How do I create a stored procedure in dbml?
Explain where clause?
What are the lambda triggers?
How to count duplicated values in a column in ms sql server?
What is partition, how will you implement it? : sql server analysis services, ssas
What are distinctive joins find as a part of sql?
What is the difference between inner join and equi join?
What is a mixed extent?
Do you know sql server 2008 introduces automatic auditing?