how to find nth highest salary

Answer Posted / brahma

select * from table_name t1 where (n-1)=
(select count(distinct(column_name)) from table_name t2
where t2.column_name>t1.column_name)

Is This Answer Correct ?    101 Yes 47 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What happens if you delete a table that is used by a view?

556


Can you insert NULL in unique column?

618


plss anybody specify tha constrian management system in dbms

1564


What is the difference between createstatement and preparedstatement?

486


Explain what are the basic functions for master, msdb, model, tempdb databases?

524






Does sql server 2000 clustering support load balancing?

560


How will you monitor replication activity and performance? What privilege do you need to use replication monitor? : sql server replication

541


How to create nested stored procedure?

536


What is open database communication (odbc)?

565


What is explicit mode in sql server?

528


What is meant by dirty read?

550


what is bit datatype? : Sql server database administration

499


Retrieve the unique rows from table without using UNIQUE and DISTINCT keywords.

580


What is the contrast amongst drop and truncate?

550


What are the database roles? : sql server security

555