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

Answer Posted / somanath

select sal from emp a where 3=(select
count(distinct(sal)) from emp b
where a.sal<=b.sal)

Is This Answer Correct ?    34 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the possible values that can be stored in a boolean data field?

517


What is prepared statement in sql?

551


What is a string data type in sql?

516


What is the difference between join and natural join?

475


1. is it possible to use the cursor atttibutes (%found ,% rowcount , %isopen , %notfound ) to our user defined cursor names ....... cursor cursor_name is select * from scott.emp if you use... cursor_name%found , %rowcount ,%isopen,%notfound...will it work... -------------------------- 2.what is the difference between the varray and index by table .. -------- 3. type type_name is table of number(8,3) index by binary_integer; identifier_name type_name; first , last , prior , next ,trim are the methods we can use it for the above type...simillary is there any way to apply for cursors... with thanks and regards..sarao...

1917






What are the differences between implicit and explicit cursors?

523


What is a loop in sql?

571


Explain two easy sql optimizations.

604


Does truncate free space?

520


Why are sql stored procedures used?

618


What is sql profiling in oracle?

551


How to get each name only once from an employee table?

611


What are the parameter modes supported by pl/sql?

536


what is innodb? : Sql dba

581


what is a composite primary key ? : Sql dba

583