please tell me the query to get details of the employee
having the second largest salary

Answers were Sorted based on User's Feedback



please tell me the query to get details of the employee having the second largest salary..

Answer / ravikiran

select top 2(salary) from emp_sal where
salary in (select sal from emp_sal order by sal desc)

Is This Answer Correct ?    2 Yes 3 No

Post New Answer

More SQL Server Interview Questions

What is multilevel indexing?

0 Answers  


What's the information that can be stored inside a bit column?

0 Answers  


Explain the purpose of indexes?

0 Answers  


What is a deadlock and what is a live lock?

0 Answers  


Which system table contains information on constraints on all the tables created?

2 Answers  






What are security principals used in sql server 2005?

0 Answers  


Are all views updatable ?

0 Answers   MCN Solutions,


1.what are diff types of joins , and explain diff between cross join and full outer join 2.diff types of views 3. Diff types of index 4. What is diff b/w stores procedure and function procedure 5.diff between double and int in SQL 6.diff between char and varchar in SQL. 7.Oracle or SQL whice you will preferred and why.

0 Answers   Aptroid,


I am having table Title with TITLE id,Author ID, Publiser ID , table AUTHOR with Author ID, Author Name, table PUBLISER with Pub ID, Pub name Here hot to find out the publiser id who have relesed the books of patriticular author?

3 Answers  


What are the difference between primary key and unique key? : sql server database administration

0 Answers  


What is an execution plan? When would you use it? How would you view the execution plan?

1 Answers  


What is the difference between having and where clause?

4 Answers  


Categories