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 will happen non-clustered index will be created on clustered index?
How is image stored in database?
how can we view column head in first page but not in remaining pages?
query to Compare data of two tables between two different Databases(Oracle and SQL Server) Eg., Source Database: Oracle Table: Employee Target Database : SQL Server Table : emp
What are the various ways to execute a query in teradata?
A design problem was given in which I was supposed to make a design for the data base for a given problem.
What is database server and how it works?
what are wrappers and build ups and what it's use?
What is a database example?
Explain natural key?
give a simple example of physical and logical data independence
What is the difference between data source and database?
define primary key index, bitmap index, hash index,virtual indwx
What is database collection?
What is aws documentdb?