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

Write the Syntax for Cursors.

Answer Posted / govardhana r

DECLARE @var1 varchar(20), @var2 varchar(20)

declare cursor_name cursor for
select val1,val2 from table_name

open cursor_name

fetch next from cursor_name
into @var1, @var2

while @@FETCH_STATUS = 0
begin
-----
-----
-----
fetch next from cursor_name
into @var1, @var2
end

close cursor_name
deallocate cursor_name

Is This Answer Correct ?    11 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to attach adventureworkslt physical files to the server?

1104


Which tcp/ip port does sql server run on? How can it be changed?

1034


Explain syntax for dropping triggers?

926


Name some of the open source software that you can use in alternative to SSR?

159


What is schemabinding a view?

918


Explain how to maintain a fill factor in existing indexes?

992


What is the difference between ROW_NUMBER and Ranking function in SQL SERVER?

1141


What command must you use to include the not null constraint after a table has already been created?

1142


What is a view and what are its advantages?

1112


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

113


How much memory that we are using in Logshipping Concept?

1783


What are ddl triggers and types of ddl trigger?

1038


What are the types of database schema? : sql server analysis services, ssas

1129


what are the different ways to return the rowcount of a table?

995


What is difference between foreign key and unique key?

1005