zero-vic

 

清空表的时候注意外键约束

 

命令版

查询数据库中所有表名
select table_name from information_schema.tables where table_schema=\'DB_name\' and table_type=\'base table\';

查询指定数据库中指定表的所有字段名column_name
select column_name from information_schema.columns where table_schema=\'DB_name\' and table_name=\'users\'

清空数据库中某表的数据

truncate table 表名 ;


 navicat 版

选中你要清空的表,右键

清除索引、和外

 

分类:

技术点:

相关文章: