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

Answers were Sorted based on User's Feedback



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

Answer / manish_patil

select sal from emp_sal where rownum = 3 order by sal desc

Is This Answer Correct ?    6 Yes 9 No

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

Answer / tushar

select max(sal) from ( select sal from emp group by sal order by sal) where rownum<4;

Is This Answer Correct ?    0 Yes 3 No

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

Answer / nagendra

select min(sal) from emp where sal in( select top 3 sal
from emp order by sal desc)

Is This Answer Correct ?    2 Yes 6 No

Post New Answer

More SQL PLSQL Interview Questions

Name the operator which is used in the query for pattern matching?

0 Answers  


What are dml commands?

0 Answers  


What is normalization? How many normalization forms are there?

0 Answers  


what is self join and how it works??

2 Answers   Infosys,


What is execute immediate?

0 Answers  






Dear All, Question for this Week Find out possible error(s) (either at compile time or at runtime) in the following PL/SQL block. State the reason(s) and correct the errors. Declare Cursor C1 is select ename, sal, comm from emp; Begin For i in C1 Loop If i.comm between 299 and 999 then Dbms_output.put_line(i.Ename || ‘ ** Good Commission’); Elsif i.comm > 999 then Dbms_output.put_line(i.Empno || ‘ ** Very Good Commission’); close C1; Else Dbms_output.put_line(i.Ename || ‘ ** ’ ||nvl(i.comm,‘O’)); End if; End Loop; End;

7 Answers   Accenture,


What is difference between sql function and stored procedure?

0 Answers  


How do you concatenate in sql?

0 Answers  


What is Collation Sensitivity ? What are the various type ?

0 Answers  


How does postgresql compare to mysql?

0 Answers  


what is sql server agent? : Sql dba

0 Answers  


How do I turn a list into a table?

0 Answers  


Categories