how to find the second salary?

Answer Posted / kavitha

select max(salary) from tablename where salary not in(select
max(salary) from tablename )

or


select max(salary) from tablename where salary <(select
max(salary) from tablename )

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Give me any three differences between Truncate and Delete.

573


What happens when unicode strings concatenate with non-unicode strings?

551


What is the Main Difference between ACCESS and SQL SERVER?

560


Can a table be moved to different filegroup?

574


explain different types of constraints? : Sql server database administration

518






Do you know what are the properties of the relational tables?

577


What is check constraint in sql server?

525


How to recreate an existing index in ms sql server?

548


How can you insert values in multiple rows using one Insert statement?

620


What is resource governor?

547


let's assume you have data that resides on sql server 6.5. You have to move it sql server 7.0. How are you going to do it? : Sql server database administration

504


How to enter binary string literals in ms sql server?

584


How do I find the query plan in sql server?

545


Do you know what is user defined datatypes and when you should go for them?

504


What is constraints and its types?

501