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

What is a trigger and types of a trigger?

924


What is index fragmentation in ms sql server?

1023


What are the default system databases in sql server 2000?

962


Can we call stored procedure in trigger?

907


What are the features of Embedded SQL

1076


what's new in sql server 2016?

906


What is the difference between dataadapter and datareader?

941


What is the native system stored procedure to execute a command against all databases?

968


What is self contained multi valued query?

949


Can I work with several databases simultaneously? : sql server management studio

943


How to apply filtering criteria at group level with the having clause in ms sql server?

944


What are logical/boolean operations in ms sql server?

978


Explain triggers?

942


Can we delete data from a view?

881


Can group by and orderby be used together?

963