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 is bind variable in oracle 11g?

587


How to run the anonymous block again?

595


What is logical backup in oracle?

578


List the various oracle database objects?

597


How do I escape a reserved word in oracle?

630






Can we write dml statement in function in oracle?

634


what is insert all statement in sql

5512


How to get execution statistics reports on query statements?

570


What is save point in oracle database?

725


What do you mean by merge in oracle and how can you merge two tables?

522


Explain about achiever in sql?

584


How to create id with auto_increment on oracle?

545


How to define an anonymous block?

618


What operating systems are supported by oracle database 10g xe?

583


Explain oracle data types with examples?

575