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 / dev anand s

select salary from (
select salary, dense_rank() over(order by salary desc) rank from emp) where rank=2;

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we call a function containing dml statements in a select query?

988


What is the use of pl/sql table?

1070


How are sql commands classified?

1094


how many ways to get the current time? : Sql dba

1012


How many row comparison operators are used while working with a subquery?

1037


What is dml statement?

961


Does a join table need a primary key?

959


What is execution plan in sql?

1053


What are different types of sql?

1196


What is t-sql? : Transact sql

993


which tcp/ip port does sql server run on? : Sql dba

1031


What is the use of count (*) in sql?

1059


What is the difference between a primary key and a clustered index?

994


Can we insert data into materialized view?

951


What do you understand by pl/sql packages?

1066