mysql> create table baixyu1(id1 int,id2 int); Query OK, 0 rows affected (0.03 sec)
mysql> insert into baixyu1 values(1,1); Query OK, 1 row affected (0.00 sec)
mysql> update baixyu1 set id1=id1+1,id2=id1; Query OK, 1 row affected (0.00 sec) Rows matched: 1 Changed: 1 Warnings: 0
mysql> select * from baixyu1; +——+——+ | id1 | id2 | +——+——+ | 2 | 2 | +——+——+ 1 row in set (0.00 sec) 更新后id2的值与id1的值是相同的
转载请注明原文地址: https://ju.6miu.com/read-668640.html