Hi,
I have two tables called
University(Had Primary Key)
Student
Here i am trying create fk on Student table with the condition ON UPDATE SET NULL ON DELETE SET NULL
The following is an error.
Msg 1761, Level 16, State 0, Line 1
Cannot create the foreign key "fk_on_Student" with the SET NULL referential action, because one or more referencing columns are not nullable.
Msg 1750, Level 16, State 0, Line 1
Could not create constraint. See previous errors.
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.


Nitin SontakkeRank #264 · 9.6K reputationPosted May 9, 2018, 9:43 PM EDT
Rajkiran SwainRank #165 · 14.4K reputationPosted May 9, 2018, 9:37 PM EDT