Friday, December 2, 2016

Truncate issue with "foreign key constraint"

if you cannot truncate your MySQL table because of a foreign key constraint, but you should

SET FOREIGN_KEY_CHECKS = 0;
Truncate table XXX;
Truncate table YYY;
SET FOREIGN_KEY_CHECKS = 1; 

No comments:

Post a Comment

Postgress - Read a XML file from a postgress table XML column

SELECT xmltable.* FROM xmldata, XMLTABLE('//ROWS/ROW' PASSING data COLUMNS id int PATH ...