如其名称所示,它用于从MySQL表中删除所有记录。
语法
Truncate table table_name;
Example
mysql> Truncate table student; Query OK, 0 rows affected (0.18 sec)
上述查询从‘Student’表中删

mysql> select * from student; Empty set (0.00 sec)
如其名称所示,它用于从MySQL表中删除所有记录。
Truncate table table_name;
mysql> Truncate table student; Query OK, 0 rows affected (0.18 sec)
上述查询从‘Student’表中删

mysql> select * from student; Empty set (0.00 sec)