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;
相关文章
相关标签/搜索