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

select salary from empTable where salary = (select
max(salary )from empTable where salary < (select max(salary
) from empTable))

OR

select salary from empTable where salary = (select
max(salary )from empTable where salary NOT IN (select
max(salary ) from empTable))

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Does oracle roll back the transaction on an error?

1013


How is pl sql different from sql?

1093


How does cross join work in sql?

1018


Are views faster than queries?

992


Can we call dml statement in function?

1056


Is left join faster than inner join?

1123


What are the various levels of constraints?

1125


What is string data type in sql?

1144


How do I write a cron which will run a sql query and mail the results to agroup?

981


how can we transpose a table using sql (changing rows to column or vice-versa) ? : Sql dba

951


What is rownum in sql?

1043


What are the indexing methods?

1048


What can you do with pl sql?

1094


What is over () in sql?

965


How global cursor can be declare with dynamic trigger ?

2210