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 / shalina bajaj

select sal from emp a
where $number = (select count(distinct(sal))
from emp b
where a.sal <= b.sal);

Is This Answer Correct ?    11 Yes 17 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How consistent is the view of the data between and within multiple sessions, transactions or statements ?

2172


what are the limitations of identity column? : Transact sql

1052


What is %rowtype in pl sql?

924


Which table is left in left join?

956


Can a view be mutating? If yes, then how?

963


How can we debug in PL/SQL?

1094


what is 'trigger' in sql? : Sql dba

1015


table structure: ---------------- col1 col2 ----- ----- 01-mar-2012 11:12:46 01-mar-2012 11:12:10 01-mar-2012 11:12:46 01-mar-2012 11:11:23 Write a query to display the result as shown below: col1 col2 ----- ----- 01-mar-2012 11:12:46 01-mar-2012 11:12:10

4096


What is the function that is used to transfer a pl/sql table log to a database table?

953


How do sql triggers work?

989


How many types of triggers exist in pl/sql?

1011


how mysql optimizes distinct? : Sql dba

1001


Write a sql select query that only returns each name only once from a table?

962


define sql insert statement ? : Sql dba

976


What is sqlca in db2?

894