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

What is rank () in sql?

999


Does db2 use sql?

1009


What is clause in sql?

1178


what is collation? : Sql dba

1205


how to use 'mysql' to run sql statements? : Sql dba

1123


What is multiple columns?

1120


How many times can we commit in a loop?

1067


What is the use of nvl function?

1243


Does pl sql work in mysql?

1035


Can there be more than one function with a similar name in a pl/sql block?

1045


What does the base_object_type column shows in the user.triggers data dictionary view?

1099


explain about mysql and its features. : Sql dba

1054


what is subquery? : Sql dba

1190


What is difference between hql and sql?

1166


Explain what is table in a database?

1110