find out the second highest salary?

Answer Posted / kamal

step 1=write a query for maximum salary.
step 2=make a sub query of step 1
step 2 a)let X==sleect all row from your table(employee)
b)let Y=select maximum salary from employee
NOw c)wrie X-Y


Syntax is:
select MAX(salary) from employeee((select * from
employee)-(selcect MAX(salary) from employee))

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the advantages of oracle?

752


How to export several tables together?

777


What is Library Cache in Oracle?

843


What is a procedure in oracle?

779


Explain about functional dependency and its relation with table design?

765


Can we insert data in view oracle?

734


What is oracle host variable?

705


what are the advantages of running a database in archive log mode?

1936


What is a trace file and how is it created in oracle?

756


What is partitioned table in Oracle?

831


How to assign values to variables?

810


how to do daily transactions with out sql* loader control file regesterd in apps?

1425


How to do paging with oracle?

753


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

841


How do I recompile a procedure in oracle?

708