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

select salary,empname from employee where
salary=(select max(salary) from employee where
salary<(select max(salary) from employee))

This query will produce all the result whose salary is
second highest.

1. A 20000
2. B 20000
3. C 20000
4. D 20000

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how can we take a backup of a mysql table and how can we restore it. ? : Sql dba

917


Why do we go for stored procedures?

993


what are all the common sql function? : Sql dba

1009


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

1013


What are the two parts of design view?

971


Can we debug stored procedure?

952


What is the default isolation level in sql server? : Transact sql

961


what are the differences between get and post methods in form submitting. Give the case where we can use get and we can use post methods? : Sql dba

1083


What is scalar function?

998


How to return an array from java to pl/sql?

1060


Can a commit statement be executed as part of a trigger?

995


Can we rollback after truncate?

979


What is the size of partition table?

987


What is sql*loader and what is it used for?

1042


Describe sql comments?

959