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 synchronized subquery?

1166


Why are sql stored procedures used?

1054


How to call shell script from pl sql procedure?

1277


Can dml statements be used in pl/sql?

1075


How do you create a unique index?

1046


what are the 'mysql' command line arguments? : Sql dba

1138


What are tables and fields in the database?

1108


Can we create table inside stored procedure?

951


What are the usages of sql?

1056


What is the difference between inner join and natural join?

1001


What are the different set operators available in sql?

1024


Explain the purpose of %type and %rowtype data types?

928


How delete all records from table in sql?

977


What does dml mean?

982


Can we perform dml on view?

1042