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

How does sql profiler work?

964


Can we insert data into materialized view?

896


What is clustered index in sql?

1000


What are records give examples?

953


What is anonymous block in sql?

1073


what is bcp? When is it used?

1046


what is a scheduled jobs or what is a scheduled tasks? : Sql dba

905


What is the max nvarchar size?

896


How to assign sql query results to pl sql variables?

991


what is 'mysqlshow'? : Sql dba

973


Explain the steps needed to create the scheduled job?

966


What is auto increment?

934


what are the different tables present in mysql, which type of table is generated when we are creating a table in the following syntax: create table employee (eno int(2),ename varchar(10)) ? : Sql dba

987


Is vs as in pl sql?

932


What is the size of partition table?

989