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 drop an existing table?

1053


Is a null value equal to anything? Can a space in a column be considered a null value? Why or why not?

1123


How to delete duplicate records based on single column from a table?

1105


Explain syntax for disabling triggers?

1097


When columns are added to existing tables, what do they initially contain?

1097


Define right outer join?

1016


How to defragment table indexes?

1039


What is encryption key?

137


Differentiate between mongodb vs. Sql server?

1142


Determine when to use stored procedure to complete sql server tasks?

1108


Do you know what guidelines should be followed to help minimize deadlocks?

1014


What is the default schema of your login session in ms sql server?

1093


What is bookmark link in ssrs?

251


Explain the different types of joins?

1046


Why I am getting this error when dropping a database in ms sql server?

1120