1.how to extract the second highest salary from emp table
having sal as a column which contains the salary of all
employee of an organisation.

Answer Posted / hema

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

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the execution control statements?

708


What is a user account in oracle?

726


What is oracle latest version?

691


What is MTTR advisor in Oracle?

694


What is oracle thin client?

620






What is key preserved table?

648


if you ctreate table identity

1971


What is ASM (Automatic Storage Management) in Oracle?

793


In XIR2 if we lost the administration password .How can we regain the password?thanks in advance.

1559


How to delete an existing row from a table in oracle?

728


Why should I use oracle database?

653


How remove data files before opening a database?

650


How to get maxsal , minsal, ename department wise in single query

1134


Point out the difference between user tables and data dictionary?

622


How a tablespace is related to data files?

664