Search snippets
Browse Code Answers
FAQ
Usage docs
Log In
Sign Up
Home
SQL
Cannot truncate a table referenced in a foreign key constraint (`video_clips`.`channel_clips`, CONSTRAINT `clips_fk` FOREIGN KEY (`clip_id`) REFERENCES `video_clips`.`clips` (`id`)) in sql]
Carmen
Programming language:
SQL
2021-04-20 13:43:20
0
Q:
Cannot truncate a table referenced in a foreign key constraint (`video_clips`.`channel_clips`, CONSTRAINT `clips_fk` FOREIGN KEY (`clip_id`) REFERENCES `video_clips`.`clips` (`id`)) in sql]
Ramon Tugade
Code:
SQL
2021-06-19 10:00:20
SET FOREIGN_KEY_CHECKS = 0; truncate table "yourTableName"; SET FOREIGN_KEY_CHECKS = 1;
0
Tags
key
table
int
con
tab
cannot
sql
channel
Related
adding unique constraint in sql
add primary key constraint in oracle
Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes (SQL: alter table `users` add unique `users_email_unique`(`email`))
Error Code: 1175. You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column. To disable safe mode, toggle the option in Preferences -> SQL Editor and reconnect.
SQLSTATE[HY000]: General error: 3780 Referencing column 'role_id' and referenced column 'id' in foreign key constraint 'user_role_id foreign' are incompatible.
Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes (SQL: alter table `users` add index `users_userable_type_userable_id_index`(`userable_type`, `userable_id`)
Insert and initialize a SQL column with value dependent on another column data
uplicate key value violates unique constraint loopback
how to remove foreign key constraint in sql
New to Communities?
Join the community