There is a 5000 EMP in company.how we find out the 5th
highest getting salary employee outof 5000 employes........

Answer Posted / udhay

SELECT MAX(salary)
FROM employees
WHERE salary
NOT IN (SELECT TOP 4 salary FROM employees ORDER BY salary
DESC)

Is This Answer Correct ?    1 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to retrieve rows from a db2 table in embedded sql?

730


Why select is not preferred in embedded sql programs?

715


What is declare cursor?

613


My sql statement select avg(salary) from emp yields inaccurate results. Why?

643


What are host variables in db2?

626






Is the primary key a clustered index?

611


SQLCODE = -199, ERROR: ILLEGAL USE OF KEYWORD CHAR, TOKEN KEY was expected

10774


How do I start db2 in windows?

565


is it compulsory commitment control in journal?

2012


What is db2 catalog database?

582


What types of tables are there in the db2 database?

554


How to connect to db2 database from windows command line?

562


What is buffer pool?

613


What is the syntax for seeing the columns and data types of a table in the db2 database?

578


What is a dbrm in db2?

576