truncate table Times "the only foreign key / primary key is referenced enabled" solutions

Preface: prompt "Empty table foreign key unique / primary key is referenced enabled " this warning

The reason: because the quilt table references the primary key, so the primary key changes just fine

solve:

Use alter table table_name disable primary key cascade; the main key is invalid

After truncate table table_name,

Then perform alter table table_name enable primary key; enabled primary key

Guess you like

Origin www.cnblogs.com/wutongshu-master/p/11912022.html