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 / r.arjunarao

select a.sal from emp a where 2=(select count(distinct(b.sal)) from emp b where b.sal>=a.sal)

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how to create a new table by selecting rows from another table in mysql? : Sql dba

1167


Why do we use procedures in sql?

1141


Can a trigger call a stored procedure?

1128


What is sql constant?

1104


What is partition in sql query?

1045


Why stored procedures are faster than query?

1079


How to rename a table?

1075


What is the clause we need to add in function body to return variable?

1053


Where can I learn sql for free?

1049


Is sql port 1433 encrypted?

1086


Explain how exception handling is done in advance pl/sql?

1046


When is the explicit cursor used ?

1090


Explain the update statement in sql

1044


How do I pipe the output of one isql to another?

1058


Which command is used to delete a trigger?

1407