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

select * from emp e1
where 2=(select count(distinct salary) from emp e2
where e1.sal<e2.sal);

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Define concurrency control. : Transact sql

1181


What are the different ddl commands in sql?

1162


Why do we create views in sql?

1148


What is trigger and stored procedure in sql?

1029


Is coalesce faster than isnull?

964


Is it mandatory for the primary key to be given a value when a new record is inserted?

1196


how to use myisamchk to check or repair myisam tables? : Sql dba

966


What is the use of procedures?

971


how would concatenate strings in mysql? : Sql dba

1086


What is error ora-01000: maximum open cursors exceeded

1136


Difference between table function and pipelined function?

1017


What is left inner join in sql?

1040


How do I view tables in sql developer?

934


What is having clause in sql?

959


ERROR:Insert or update on table"accnt" violates foreign key constraints "acct_to_curr_symbol" DETAILS:KEY(accnt_curr_id)(-2)is not present in the table "curr_symbol" ......solve The Problem..

2490