Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
定义与另一个表具有可选外键关系的 oracle 表的正确方法是什么?例如,一些员工记录定义了他们来自的国家(来自国家/地区表的 FK),而有些则没有。
只允许该列可以为空(不要让它NOT NULL)并像往常一样创建您的外键。数据库将对包含该行中的值的任何行强制执行外键,但如果该行为空,则不会强制执行任何操作。
NOT NULL