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 get second highest salary from a table

Answer Posted / srinivas

select * from emp m where(select count(distinct sal)+1 from emp s where s.sal>m.sal)=2

Is This Answer Correct ?    7 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is AUTH_ID and AUTH_USER in pl/sql ?

2198


What are pl sql procedures?

1032


What is triggering circuit?

1073


How to create a menu in sqlplus or pl/sql?

1131


Is full outer join same as cross join?

978


What is flag in sql?

1040


What does trigger mean in slang?

1072


How do I upgrade sql?

1008


Can a table have no primary key?

1069


What is sqlite used for?

1008


Which kind of parameters cannot have a default value in pl sql?

1157


What is difference between cursor and trigger?

1085


Which nosql database is best?

988


What is primary key in db?

1017


What is pls_integer in pl sql?

1110