Home > database > Could you tell me why cancel the foreign key constraints (set foreign_key_checks=0) , or delete data
Could you tell me why cancel the foreign key constraints (set foreign_key_checks=0) , or delete data
Time:10-23
Delete the first two records complains (mysql error 1451) :
But it can be deleted successfully other data, such as article 3 has been deleted successfully:
CodePudding user response:
The set foreign_key_checks=0; If only for the current connection effectively, not global So delete operation to the connection in the execution of this command