MemoryRefresh!

Administration / Foreign key disable     Foreign key disable



Questions Answers 0%

Pages   0 from 12
Questions   0 from 14

Reset


Temporary disable foregin keys
ALTER TABLE article DISABLE KEYS; SET FOREIGN_KEY_CHECKS=0; ... do you processing ... SET FOREIGN_KEY_CHECKS=1; ALTER TABLE article ENABLE KEYS; There are two foreign_key_checks variables: a global variable and a local (per session) variable. Upon connection, the session variable is initialized to the value of the global variable. The command SET foreign_key_checks modifies the session variable. To turn off foreign key constraint globally, do the following
SET GLOBAL FOREIGN_KEY_CHECKS=0; ... SET GLOBAL FOREIGN_KEY_CHECKS=1; stackoverflow.com stackoverflow.com

Related Pages

Innodb
Create table
Add column
Foreign key
Foreign key disable
Create database
Check version
Replace


0% 100%
 
 
0 pages 12 pages
1) How to temporary disable FK





2) Turn off FK contraint




3) Turn off FK contraint globally







Temporary disable foregin keys
ALTER TABLE article DISABLE KEYS; SET FOREIGN_KEY_CHECKS=0; ... do you processing ... SET FOREIGN_KEY_CHECKS=1; ALTER TABLE article ENABLE KEYS; There are two foreign_key_checks variables: a global variable and a local (per session) variable. Upon connection, the session variable is initialized to the value of the global variable. The command SET foreign_key_checks modifies the session variable. To turn off foreign key constraint globally, do the following
SET GLOBAL FOREIGN_KEY_CHECKS=0; ... SET GLOBAL FOREIGN_KEY_CHECKS=1; stackoverflow.com stackoverflow.com





Programming

Php
   
Regex
   
MySQL
   
Css
   
jQuery
   
Git
   


References
n/a