DML_修改数据
DML_修改数据
修改数据:
语法:
update 表名 set 列名1 = 值1,列名2 = 值2, ... [ where 条件 ] ;
注意:
1. 如果不加任何条件,则会将表中所有记录全部修改.
update stu set age =117 where id =3; update stu set age =117,name='abc' where id =2; select * from stu
update 表名 set 列名1 = 值1,列名2 = 值2, ... [ where 条件 ] ;
1. 如果不加任何条件,则会将表中所有记录全部修改.
update stu set age =117 where id =3; update stu set age =117,name='abc' where id =2; select * from stu