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 in SQL(as/4000

Answer Posted / shasi

select sal from emp a where &n=(select count(sal) from emp
b where a.sal>=b.sal)
First u enter 1 means 1st highest sal.then enter2 2nd
highest sal

Is This Answer Correct ?    1 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are tables and fields in the database?

1112


What is the usage of nvl function?

1040


What is left join in sql?

1052


What is the difference between view and stored procedure?

959


how to drop an existing view in mysql? : Sql dba

1061


What do you mean by “trigger” in sql?

1080


How to select all records from the table?

1136


How do I run a sql query?

1022


What is the difference between cross join and natural join?

1022


What is auto increment?

1000


How to set up sql*plus output format in oracle?

1038


How can we implement rollback or commit statement in a trigger?

1039


what are the advantages a stored procedure? : Sql dba

977


What is string join?

979


Can dml statements be used in pl/sql?

1081