I want to write query like this:
SET @id := 0;
UPDATE table1
SET
field1 = @id + 1,
@id := @id + 1
And get error message:
#1064 - You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use
near '@id := @id + 1' at line 3
How write this query correctly?
10x thx for your help