How to get employee name from employee table which is the
fiveth highest salary of the table
Answer Posted / a g srikanth
Dear Shiv Shankar
There is a small mistake in your query
Select Salary From Employee a Where 5=(
Select Count(Distinct Salary) From Employee b
Where a.Salary <= b.Salary )
the correct one should be
Select Salary From Employee a Where 5=(
Select Count(Distinct Salary) From Employee b
Where a.Salary >= b.Salary )
please check it...
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What are operators available in sql?
What are the different operators available in sql?
how to calculate the difference between two dates? : Sql dba
How many types of sql are there?
what is transaction? : Sql dba
Is sqlite free?
Can we create foreign key without primary key?
What is having clause in sql?
how to start mysql server? : Sql dba
What is a unique constraint?
What does (+) mean in sql joins?
what is clause? : Sql dba
Is sql a backend?
What is the non-clustered index in sql?
How do you declare a variable in pl sql?