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 / aravind naidu

select * from emp e where (select count(*) from emp where sal>=e.sal)=&n; put n = 2 for second highest sal,n = 3 for third highest sal ....and so on.

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What programs use sql?

1088


What is a natural join?

1140


what are ddl statements in mysql? : Sql dba

1269


How to select 10 records from a table?

1208


How to execute a stored procedure?

1162


What is a composite primary key?

1142


What is difference between cursor and trigger?

1129


What is a design view?

978


what is the difference between ereg_replace() and eregi_replace()? : Sql dba

1228


Can a composite key be null?

1035


What is difference between procedure and trigger?

1022


What does dml mean?

1043


What is normalisation and its types?

1044


what are all different types of collation sensitivity? : Sql dba

1031


How many types of sql are there?

1047