Answer the question
In order to leave comments, you need to log in
Null value for foreign key?
There are two tables (schematic):
user
id - int not null pk
name - varchar(255) not null
title
id - int not null pk,
name - varchar(255) nit null
user_id - int
The title.user_id field refers to user.id as a foreign key. Question: Is null allowed in the title.user_id field?
Answer the question
In order to leave comments, you need to log in
Permissible. Don't forget to add ON DELETE SET NULL in the FK description.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question