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

select max(sal)from emp where sal <> (select max(sal)from emp)

OR

select max(sal)from emp where sal < (select max(sal)from emp)

OR

select max(sal)from emp where sal != (select max(sal)from emp)

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How many rows can sqlite handle?

1112


What is transaction control language (tcl)?

1139


What is mutating sql table?

1109


What is the location of pre_defined_functions.

1166


Which column in the user.triggers data dictionary view shows that the trigger is a pl/sql trigger?

1036


What is dml and ddl?

959


Where can I learn sql for free?

987


What are different types of indexes?

1010


Why do we use triggers?

967


How to know the last executed procedure?

1099


What is a system versioned table?

986


What is sql data?

995


Are stored procedures faster than queries?

948


Enlist some predefined exceptions?

1059


How long does it take to learn pl sql?

1061