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

DECLARE authors_salary CURSOR
select top2(salary) from tb_employee order by desc salary

open author_salary
FETCH NEXT FROM authors_salary into @topsalary

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to change the name of a database user?

960


what is spatial nonclustered index

992


How do you open a cluster administrator?

1053


How to download and install sql server 2005 books online?

1191


Once setting replication, is it potential to own a publisher as sixty four bit sql server and distributor or subscribers as a thirty two bit sql server?

1012


What is the datatype of rowid?

928


What is SQL Azure Data sync?

121


Explain transaction server consistency?

976


What is bit data type? What's the information that can be stored inside a bit column?

921


Mention the differences between sql server and mysql.

1016


Is a primary key unique?

992


Is there any performance difference between if exists (select null from table) and if exists (select 1 from table)?

971


What is openxml in sql server?

1171


What is change data capture (cdc) in sql server 2008?

1024


What are dml triggers and types of dml triggers?

983