1、创建测试表,
create table test_update_cols(id int,value varchar(20));
2、插入测试数据;
insert into test_update_cols values (1,'v1');
insert into test_update_cols values (2,'v2');
insert into test_update_cols values (3,'v3');
insert into test_update_cols values (4,'v4');
3、查询表中全量数据;select t.* from test_update_cols t;
4、编写语句,同时更新id和value两个字段;
update test_update_cols set id = id+100, value = concat(value,'00');
5、编写语句,重新查询数据,可以发现两个字段已经被更新;select t.* from test_update_cols t;