how to find nth highest salary
Answer Posted / bala
-- to find third highest salary from emp table
select empname,empsal from emp a where 3 = (select count(*)
from emp b where a.empsal <= b.empsal);
| Is This Answer Correct ? | 6 Yes | 12 No |
Post New Answer View All Answers
How to create a login account in ms sql server to access the database engine using "create login" statements?
What is bcp? When does it use?
What is a partitioned view?
What is a unique key constraint?
What are the features of Embedded SQL
How to insert data into an existing table?
what is the difference between count(*) and count(1) ?
Write a query for primary key constraint with identity key word?
Characterize join and name diverse sorts of joins?
What is an index in a database?
What is dirty read?
Why I have to use stored procedures?
Explain iaas, paas and saas?
How and why use sql server?
How do I view a stored procedure in sql server?