1.已经创建的表增加一列数据
alter table service.service_info add column type int(11) not null;
2.对表中多行数据进行修改
UPDATE service.service_info
SET type = 2
WHERE id IN (54,55,56,57,58,59,60,61,62,63,64,65,66,67,68);
本文介绍了如何使用SQL语句对已存在的表增加新的列,并演示了批量更新表中特定行数据的方法。
1.已经创建的表增加一列数据
alter table service.service_info add column type int(11) not null;
2.对表中多行数据进行修改
UPDATE service.service_info
SET type = 2
WHERE id IN (54,55,56,57,58,59,60,61,62,63,64,65,66,67,68);

被折叠的 条评论
为什么被折叠?