Write a query to get 2nd maximum salary in an employee table ?

Answer Posted / sandeep

select top(1) a.name
from

(
select top(2) name,salary
from
employee
order by salary desc
)a
order by a.salary asc

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the components of sql?

596


How exception handling is done in advance pl/sql?

501


Is a table valued function object?

583


Hi how to import oracle sequence in Informatica? Please write stored procedure code that will import oracle sequence in Informatica SP transformation as per below scenario Oracle table product list Pro_id, pro_name 101, LED Lights. 102, 20watt CFL Lights. 103, 30 watt CFL lights Now a new flat file with new product list needs to be added to oracle table product list with oracle sequence. flat file product Prono,pro_name, 1, 20 watt tube light 2, 30 watt tube light & target should be like 101, LED Lights. 102, 20watt CFL Lights. 103, 30 watt CFL lights. 104, 20 watt tube light 105, 30 watt tube light thks reg suvarna joshi suvarnaatsuvarna@rediffmail.com

2074


What is difference between stored procedures and application procedures?

574






Do triggers have restrictions on the usage of large datatypes, such as long and long raw?

694


Explain raise_application_error.

644


Show the cursor attributes of pl/sql.

615


What does varchar include?

522


what is the difference between a web-garden and a web-farm? : Sql dba

565


Does user triggers have entry for trigger with compilation errors?

602


what are numeric data types? : Sql dba

582


What is primary and foreign key?

593


Explain how to use transactions efficiently : transact sql

529


What is cursor in pl sql with examples?

484