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...

find 2nd highest salary of person using cursor concept?

Answer Posted / pawan

select * from emp a where 2=(select count(distinct(sal)) from emp b where a.sal<=b.sal);

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to loop through result set objects using mssql_fetch_array()?

1078


In case you have filters in your report, when filters will be applied in cached report instance?

113


What is 'Join' and explain its various types.

1137


Why SQL Agent is used?

1150


what is the difference between writing data to mirrored drives versus raid5 drives. : Sql server administration

967


What are key constraints?

976


Do you know what is a trace frag? Where do we use it?

999


What is clustered index

1008


What is save transaction and save point?

1202


How to drop existing views from a database in ms sql server?

1103


List out the differences between the clustered index and non-clustered index in sql server?

1005


What are the difference between “where” and “having” clause in sql server?

1072


What are truncate options available in sql server? : sql server database administration

1030


State the difference between local and global temporary tables?

1119


explain declarative management framework (dmf) in sql server 2008?

993