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 / sagar

if the salary is simple non-duplicate salary, you can use
the below queries:

select max(sal) from emp where sal != (select max(sal) from emp)

you can also try

select sal from (select * from emp order by sal desc) where
rownum = 2

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the primary use of normalization?

1011


Why is sql important?

1115


What is left join in postgresql?

1051


What port does sql server use?

1066


What is a file delimiter?

1101


What is scalar data type in pl sql?

1075


How can we connect an Android App to an Oracle database and use the PL/SQL procedural code?

1144


Which command is used to delete a package?

1179


What is delimiter in pl sql?

1064


What is the need of merge statement?

1040


How do I count duplicates in sql?

1116


What is scalar and vector?

1008


How you can copy a file to file content and file to pl/sql table in advance pl/sql?

1151


What is trigger explain it?

1020


what are the disadvantages of mysql? : Sql dba

1149