暑期自学 Day 10 | 数据库 (二)- DML
DML - 增删改表中数据
添加数据
insert into t_name(col1, col2, ..., colN) values(type1, type2, ... typeN);
删除数据
delete from t_name where [condition];
truncate table t_name
删除表的所有数据,创建一个一模一样的空表
修改数据
update table t_table set name = '', id = 0 where [condition];
如果删除,修改不加 where 条件,所有列都会受影响
本作品采用《CC 协议》,转载必须注明作者和本文链接