更新修改数据
2017-01-22 本文已影响0人
孤岛渔夫
-- 更新(修改)数据
-- update 表名 set 字段名1 = 字段值1, 字段名2 = 字段值2 .... 字段名N= 字段值N where 条件表达式
update student set sex=1 where id=3;
update student set sex=2,age=18 where id>3;
-- 更新(修改)数据
-- update 表名 set 字段名1 = 字段值1, 字段名2 = 字段值2 .... 字段名N= 字段值N where 条件表达式
update student set sex=1 where id=3;
update student set sex=2,age=18 where id>3;