I have a relation between two tables. The foreign key table can have a row related in the primary table. There's a way to enforce the value of the FK column to be NULL or one of the values of the PK column in the primary table?
Sql-server – How to enforce a nullable foreign key
database-designforeign keysql serversql-server-2008
Related Question
- How to represent foreign key in an ER diagram
- How to get a surrogate key value in order to put a foreign key in and create relationship
- Conditional Foreign Key Relationship in PostgreSQL – Implementation Guide
- Primary key which is foreign key in an relationship is specified NOT NULL. Why
- SQL Server – Configure Non-Nullable Foreign Key with Default Guid.Empty
- Mysql : foreign key relative to multiple tables
- Two composite foreign keys have identical columns which must be equal value
Best Answer
Yes, why not? Did you try it?
If this is not what you meant, then please elaborate or re-word your question.