Answer the question
In order to leave comments, you need to log in
Should I set DEFAULT or NULL for FOREIGN KEY in MySQL?
Hello!
I have three tables cascading from each other:
table_1:
Answer the question
In order to leave comments, you need to log in
This, oddly enough, depends on whether the field that stores the binding is required to be filled. If it is mandatory (that is, the ratio is 1 to 1), then neither the default value nor nullable should be specified. If not required (ratio 0 to 1 or 1 to 1), then you can specify a default value or a nullable flag.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question