CURSOR

Used in T-SQL and PL/SQL to allow row by row processing of a query result

DECLARE

ISO Syntax 

SQL Server, others

DECLARE cursor_name [ INSENSITIVE ] [ SCROLL ] CURSOR   

     FOR select_statement   

     [ FOR { READ ONLY | UPDATE [ OF column_name [ ,...n ] ] } ]  

[;]  

Transact-SQL Extended Syntax 

SQL Server

DECLARE cursor_name 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 ] ] ]  

[;]

Bibliography