How can I set a variable while doing an Update statement? I can't seem to figure out the syntax.
So I want something like this below but it's saying the syntax is wrong:
SET @tempVariable := 0;
UPDATE myTable SET col1 = 5, col2 = @tempVariable, @tempVariable := 100;
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…