MySQL Foreign Keys DROP / ADD

Click here to see the most important and most used foreign key commands:ADD FOREIGN KEY:

alter table TABLE_NAME add foreign key (FOREIGN_KEY_COLUMN) references REFERENCED_TABLE(REFERENCED_COLUMN)

DROP:

alter table TABLE_NAME drop foreign key FOREIGN_KEY_CONSTRAINT[/sq]

Leave a Reply