Mysql 删除语句
2020.03.02 14:34
2020.03.02 14:34
1. 删除语句
1.1. 方式一
delete from table where 条件
注:删除的是整行;不加where条件将会删除表中所有数据;
删除name为wudao的数据:
# 删除name为wudao的数据
delete
from beauty
where name = 'wudao';
1.2. 方式二
表中所有数据的删除,使用truncate
语法:truncate table 表名
如:清空Boy表所有数据:
truncate table boys;
本节阅读完毕!
(分享)