2

If I do this

ALTER TABLE `table`
ADD CONSTRAINT `FK_table` 
FOREIGN KEY (`IDtable`) 
REFERENCES `table2` (`ID`) 
ON UPDATE CASCADE;

What is default behavior for ON DELETE? Is it restrict, cascade, set null?

FosAvance
  • 2,363
  • 9
  • 36
  • 52
  • 1
    `NO ACTION` Related; [What is MySQL's default ON DELETE behavior?](http://stackoverflow.com/questions/1027656/what-is-mysqls-default-on-delete-behavior) – Sam Nicholls Jul 13 '13 at 11:59

1 Answers1

1

If you don't set an action, the default will be NO ACTION.

juergen d
  • 201,996
  • 37
  • 293
  • 362