更新时间:2023-11-30 19:53:34
创建列,但允许NULL。 使用外键表中的正确数据填充该列。 改变列添加不为null。 添加外键约束。
Create the column, but allow NULL. Populate the column with the correct data from the foreign key table. Alter the column add not null. Add the foreign key constraint.
如何向MS SQL中的现有(填充)表中添加NOT NULL FOREIGN KEY列?