1.修改单表的记录
语法:
update 表名
set 列=新值,列=新值,。。。
where 筛选条件;
update beauty setphone='15745646541'whereid=13;
2、修改多表的记录
92语法:
update 表1 别名,表2 别名
set 列=值,。。。
where 连接条件
and 筛选条件
99语法
update 表1 别名
inner|left|right join
表2 别名
on
连接条件
set 列=值,。。。
where 筛选条件
UPDATEbeauty bjoinboys boonbo.id = b.boyfriend_idsetphone = '114'whereboyName = '张无忌';
updateboys boright joinbeauty bonbo.id = b.boyfriend_idsetb.boyfriend_id=2wherebo.id is null;
