现有如下的表
DML 数据操作 增(四种方法) 修 删
-- 增
INSERT INTO student (NAME,birthday,phone,height,reg_time)VALUES('詹姆斯','1985-2-3','15222233',1.98,NOW())
INSERT INTO student SET NAME='科比' ,birthday='19863',phone='15622333'
-- 插入多个
INSERT INTO student (NAME,birthday,phone,height,reg_time) VALUES('詹姆斯','1985-2-3','15222233',1.98,NOW()), ('咕咕咕','1985-2-3','152265233',1.88,NOW())
-- 复制数据插入stu表格中
INSERT INTO stu(number,NAME,birthday,phone,height,reg_time) SELECT* FROM student
-- 修 where表示条件
UPDATE student SET NAME="梅西", height=1.70 WHERE number=1
-- 删 DE where表示条件
LETE FROM student WHERE number=1
增加后:
修改后:
删除后