Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

how to find the second highest salary from emp table?

Answer Posted / nitin umale

SELECT *
FROM employees
WHERE salary =
( SELECT MIN ( r.salary)
FROM ( SELECT salary
FROM ( SELECT DISTINCT salary
FROM employees
ORDER BY NVL(salary,0) DESC
)
WHERE rownum<3) r
);

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 rollup and cube in t-sql? : Transact sql

1049


how to select first 5 records from a table? : Sql dba

922


Which is better join or inner query?

962


how to decrement dates by 1 in mysql? : Sql dba

970


Can a key be both primary and foreign?

946


What is sql key?

923


How do you declare a variable in pl sql?

967


How is a PL/SQL code compiled?

1172


what is a materialized view? : Sql dba

999


what is a trigger in mysql? : Sql dba

1071


What are the two virtual tables available at the time of database trigger execution?

1160


Is drop table faster than truncate?

942


What is union and union all keyword in sql?

972


Can function return multiple values in sql?

988


What are the two types of cursors in pl sql?

1004