Friday, October 24, 2014

cursor in sql server example

Posted by Gnani Palepu  |  No comments

 How to declare a cursor in stored procedure using SQL  
 DECLARE CursorName [ INSENSITIVE ] [ SCROLL ] CURSOR   
    FOR select_statement   
    [ FOR { READ ONLY | UPDATE [ OF column_name [ ,...n ] ] } ]  
 [;]  
 Transact-SQL Extended Syntax  
 DECLARE CursorName CURSOR [ LOCAL | GLOBAL ]   
    [ FORWARD_ONLY | SCROLL ]   
    [ STATIC | KEYSET | DYNAMIC | FAST_FORWARD ]   
    [ READ_ONLY | SCROLL_LOCKS | OPTIMISTIC ]   
    [ TYPE_WARNING ]   
    FOR select_statement   
    [ FOR UPDATE [ OF column_name [ ,...n ] ] ]  
 [;]  
 simpl of How to declare a cursor in stored procedure using SQL server  
 for more details visit   
 http://scriptquery.blogspot.in/  
 http://scriptquery.blogspot.in/  

11:37 PM Share:

0 comments:

Get updates in your email box
Complete the form below, and we'll send you the best coupons.

Deliver via FeedBurner
Proudly Powered by Blogger.
back to top