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 / dakshin

select * from (select a.*,dense_rank() over (order by sal) rnk from emp a order by sal) where rnk =2

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why select is used in sql?

969


How can a function retun more than one value in oracle with proper example?

1029


how to implement one-to-one, one-to-many and many-to-many relationships while designing tables? : Sql dba

919


How do you drop a trigger?

924


Why do we use sql constraints?

1124


Can we alter stored procedure?

945


explain normalization concept? : Sql dba

998


How do I run sql?

1096


which operator is used in query for pattern matching? : Sql dba

950


What is cross join sql?

868


Is drop table faster than truncate?

942


What is difference between nchar and nvarchar?

958


What is the use of <> sql?

933


Can a foreign key be a duplicate?

859


What is the difference between a procedure and a function?

1013