MySQL的Update語句Set順序問題

1. 測試一 create table test(id int,  tag int, num int); insert into test (id, tag, num) values(1, 1, 1), (2,2, 2), (3,3,3); update test  set   tag = 4, num=case when tag=4 then 4 else 3 end where tag=3;
相關文章
相關標籤/搜索