mysql - truncate table referenced by foreign key

other
voted: 0
vote
mysql truncate foreign-key check-constraints

To truncate table You can turn foreign key checks of, truncate table, and enable foreign key again.

SET FOREIGN_KEY_CHECKS = 0; 
TRUNCATE products; 
SET FOREIGN_KEY_CHECKS = 1;
working url: not entered
version: not entered
Leave a Comment:
Characters left:
No comments yet.