write a query for the fifth highest salary?
Answer Posted / piyush gupta
select distinct(a.sal) from emp a where 5=(select
count(distinct(b.sal)) from emp b where a.sal<=b.sal)
you can this query for nth highest salary
replace 5 with any number
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What is the difference between primary key, foreign key and candidate key?
Which three commands cause a transaction to end?
What do you mean by foreign key and primary key?
Explain the record term used in database.
WHAT IS NEED BY METION DATFMT AND TIMFMT IN H-SEPICITION IN RPGLE?
What is the importance of database partitioning?
A lowest level of security by most RDBMS is
Explain the table term used in database.
What is a database connection string?
Why merge statement is used inside the database?
What is aws documentdb?
Write a query to get maximum and second maximum in oracle?
List the properties of a transaction.
What is a database string?
What do you mean by database?