标签: mysql if-statement set
我有一个表,我希望在一列中将1切换为0,仅当另一列不为空时。我试过这个,但是我有语法错误。
UPDATE table SET column = 0 WHEN another_column is not null;