how to find nth highest salary

Answer Posted / sameera chiluka

select secondMAXsal from emp
WHERE seconMAXsal = ((MAXsal)-1);

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to add a new column to an existing table with "alter table ... Add" in ms sql server?

583


What is the difference between createstatement and preparedstatement?

499


Comment,Datatypes are unlimited

1636


Do you know what is replace and stuff function in sql server?

477


What are the components of dbms?

540






how to control the amount of free space in your index pages? : Sql server database administration

604


What is the temp table?

555


What are commonly used odbc functions in php?

545


What is a raid and what are different types of raid configurations?

638


How to modify the underlying query of an existing view?

545


How to drop existing indexes in ms sql server?

598


What is attribute hierarchy? : sql server analysis services, ssas

527


Define a cross join?

600


What is the maximum number of index per table?

572


How do database indexes work?

546