select Nth highest salary by using rownum
Answer Posted / welcomeashwin
SELECT * FROM HR.EMPLOYEES EMP1
WHERE &N=(
SELECT COUNT(DISTINCT(SALARY))
FROM HR.EMPLOYEES EMP2
WHERE EMP1.SALARY<=EMP2.SALARY
);
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Which database server is best?
What are the components of rdbms?
Explain the different types of join operations?
What is the purpose of a database table?
What is structure of dbms?
Explain the advantages of rdbms?
What are the different types of database keys?
What do you understand by cursor? Mention the different types of cursor?
how to retrive a data From database into the grid view..?
What is cold backup and hot backup (in case of oracle)?
i have table as source table and flat file as target i need yo perform some logic in loading the data. is it posible? and one more thing the no of fields in source is 200+ and for target is 30+ how i can map them.........
What is netlib for clipper?
Explain data independence?
What are the main functions of a database management system?
In which format image is stored in database?