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 / vinod dubey

select * from emp
where sal = (select max(sal) from emp where sal <>(select max(sal) from emp));

it will defiantly work

best of luck

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 the purpose of a secondary key?

1019


What is lexical units in pl sql?

1209


The in operator may be used if you know the exact value you want to return for at least one of the columns.

1228


Define join and name different types of joins?

1056


Why do we need cursor in pl sql?

1187


What types of commands can be executed in sql*plus?

1167


Can we update views in sql?

990


What is the maximum size of sqlite database?

1156


what is the syntax used for partition in tsql? : Transact sql

1061


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

1123


What are different types of keys?

1176


What is trigger in sql?

1156


How can you view the errors encountered in a trigger?

1025


What is before and after trigger?

1010


What is function and procedure in pl sql?

1119