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 does dml mean?
What is the max nvarchar size?
What is the clause we need to add in function body to return variable?
What is sql select statement?
How do I use google cloud in sql?
What do you understand by pl/sql packages?
Why do we use view in sql?
Differentiate pl/sql and sql?
what is sql server agent? : Sql dba
how to shutdown mysql server? : Sql dba
Which are the different character-manipulation functions in sql?
what are date and time functions in mysql? : Sql dba
What is Materialized View? In What Scenario we Use Materialized View?
First round ------------------- - Procedure - Packages - Views - Virtual tables - Can we use dcl with in function? - Joins and few scenarios - Triggers and its type - Pragma, type and its functionality - How to create db link in oracle - Materialized view - How to find duplicate values from table? - Cursor and its functionality - Write a script to display friday and its date from a entire year. - Exception Handling Second round ------------------------ Gave a scenario like. Need to write a function to perform. When user try to change a password. It must not be last five password and a given password can be combination of characters, symbols, upper and lower case.
What is user in sql?