腾讯云优惠券
如何用SQL语句清空呆错网址导航系统的所有数据?
人气:347 更新:2022-02-15

SQLITE3代码如下,包含清空栏目分类、标签数据、内容数据,并且将ID归零

DELETE FROM dc_term;
DELETE FROM dc_term_meta;
DELETE FROM dc_term_map;
DELETE FROM dc_term_meta;
DELETE FROM dc_info;
DELETE FROM dc_info_meta;
DELETE FROM sqlite_sequence WHERE name='dc_term';
DELETE FROM sqlite_sequence WHERE name='dc_term_meta';
DELETE FROM sqlite_sequence WHERE name='dc_term_map';
DELETE FROM sqlite_sequence WHERE name='dc_term_meta';
DELETE FROM sqlite_sequence WHERE name='dc_info';
DELETE FROM sqlite_sequence WHERE name='dc_info_meta';

clear-data.png

MYSQL代码如下,包含清空栏目分类、标签数据、内容数据,并且将ID归零

truncate table dc_term;
truncate table dc_term_meta;
truncate table dc_term_map;
truncate table dc_term_meta;
truncate table dc_info;
truncate table dc_info_meta;