Sample Header Ad - 728x90

FOR UPDATE clause allowed only for DECLARE CURSOR

-3 votes
2 answers
6829 views
Can anyone please advice what is wrong with this part of my cursor statement:
declare @ColumnName nvarchar(30)
declare @IsUpdated tinyint
declare @UpdateCursor cursor
select @ColumnName = ColumnName , @IsUpdated = IsUpdated from MyTable for update of IsUpdated
I am receiving error:
FOR UPDATE clause allowed only for DECLARE CURSOR
This is the first time I am creating cursor, but as far as I know the statement for update looks correct
Asked by Nizami Khalilbayli (131 rep)
Nov 15, 2016, 09:24 AM
Last activity: Sep 23, 2024, 09:45 PM