Find out the 3rd highest salary?
Answer Posted / aarti verma
get the 3rd highest salary:
SELECT DISTINCT salary from employee e ORDER BY salary DESC
LIMIT 2,1;
get the records of employees having 3rd highest salary:
SELECT * FROM employees WHERE salary = (SELECT DISTINCT
salary from employee e ORDER BY salary DESC LIMIT 2,1);
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What are variables in pl sql?
How can I change database name in sql?
How to install oracle sql developer?
how to get a list of all tables in a database? : Sql dba
How does a covering index work?
What are the different set operators available in sql?
what is the maximum length of a table name, database name, and fieldname in mysql? : Sql dba
what is data manipulation language? : Sql dba
Explain table and field in sql?
how to create a new table in mysql? : Sql dba
What is the use of pl/sql table?
What is insert command in sql?
explain what is mysql? : Sql dba
Advantages and disadvantages of stored procedure?
What is a memo field?