select * from temp3 where test4 = 1
执行sql:
update temp3 as a, temp3 as b set a.test1=b.test3, a.test3=b.test1 where a.id=b.id and a.test4=1 and b.test4=1;
结果:
select * from temp3 where test4 = 1
select * from temp3 where test4 = 1
执行sql:
update temp3 as a, temp3 as b set a.test1=b.test3, a.test3=b.test1 where a.id=b.id and a.test4=1 and b.test4=1;
结果:
select * from temp3 where test4 = 1