How to find the second largest salary in the emp database and
also How to find 3rd,4th and so on ........ in the emp database

plz mail the answer @ mak2786@gmail.com

Answer Posted / neon

select salary from emp
where salary = (select max(salary) from emp
where salary <>(select max(salary) from emp)

Is This Answer Correct ?    8 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Define indexes?

606


What is a recursive stored procedure in sql server?

571


How to enable tcp/ip protocol on a sql server?

589


How many types of built in functions are there in sql server 2012?

490


Explain trigger and its types?

614






What is the report builder?

106


Explain what you mean by 3 tier architecture.

629


Recommend an approach to ensuring that all changes in the remote databases synchronize with the SQL Azure database?

106


Difference between Sql server reporting services and Crystal reports?

124


What is built-in function?

549


You are creating an application where users are asked their gender in the gender combo box you have three options: ‘male’ , ‘female’ and ‘i choose not to disclose’ these options are stored in the table as 1, 0 or null which datatype should you use?

547


Can we perform backup restore operation on tempdb? : sql server database administration

584


Why use triggers?

574


How to return the top 5 rows from a select query in ms sql server?

593


How to rebuild master databse?

663