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

How to look at the current sql*plus system settings?

1211


What is trigger types in sql?

1042


What can sql server reporting services do?

1162


Explain select statements in sql?

1105


Is clustered index a primary key?

986


What is sql stand for?

1033


What are dml commands?

1071


what is datawarehouse? : Sql dba

1064


What are the types of join and explain each?

1100


What is pl sql commands?

1094


Is it important to partition hard disk?

1067


what does it mean to have quoted_identifier on? : Sql dba

1180


What is sql resultset?

1037


What is pl sql variable?

1034


how to add a new column to an existing table in mysql? : Sql dba

1112