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 use the inserted and deleted pseudo tables?

925


Where can you add custom error messages to sql server?

1065


What do you need to connect php to sql server?

1060


What can be used instead of trigger?

1113


What are the authentication modes in sql server? How can it be changed?

1068


Explain partitioned view?

1034


What is inner join? Explain with an example?

1132


What is the difference between SQL notification and SQL invalidation?

1100


Difference between drill down and drill through report.

906


How to create “dependant” parameter “make, model, year”

125


What is deploy, process and build? : sql server analysis services, ssas

1054


What are the different types of join?

1117


What are the advantages of the mirroring?

1032


Can the query output be sorted by multiple columns in ms sql server?

947


What are the disadvantages of primary key and foreign key in SQL?

1069