Thanks for the answer
I used it, but the problem is still the same
This statement
SET @num := 0;
UPDATE MyTable SET ID = @num := (@num+1) where ID_Name =1;
works in MySQL effectively, but when in Lazarus the error is due to not recognizing tokin :@ num