how to check the 3rd max salary from an employee table?

Answer Posted / radha sri seshu.kolla

1)SELECT MAX(SAL) FROM EMP WHERE LEVEL=3 CONNECT BY PRIOR
SAL>SAL
2)SELECT E.SAL FROM
(SELECT SAL,DENSE_RANK() OVER(ORDER BY SAL DESC)R FROM EMP)
E WHERE E.R=3

9966112520

Is This Answer Correct ?    10 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a recursive join sql?

597


What is not in sql?

500


What is difference between pls_integer and integer?

521


what is auto increment? : Sql dba

575


How do you truncate?

507






Write a sql select query that only returns each name only once from a table?

572


Advantages and disadvantages of stored procedure?

581


How to use distinct and count in sql query? Explain

613


table structure: ---------------- col1 col2 ----- ----- 01-mar-2012 11:12:46 01-mar-2012 11:12:10 01-mar-2012 11:12:46 01-mar-2012 11:11:23 Write a query to display the result as shown below: col1 col2 ----- ----- 01-mar-2012 11:12:46 01-mar-2012 11:12:10

3348


How to avoid using cursors?

599


Does pl sql work in mysql?

536


Why do we use procedures?

519


What is the location of pre_defined_functions.

646


Is it possible to read/write files to-and-from PL/SQL?

656


Is a secondary key the same as a foreign key?

492