问题描述
嗨朋友们:
我有一个产品我要在其中创建新列Modified_By的表格和Modified_Date_Time。此列不允许空值。
但是,由于数据库已经有数据,为了创建此列,我必须定义为允许空值。然后,我运行一个更新新列的过程。最后一步是取消选中允许空值。属性,但是当我试图保存表格更改时,我收到以下错误:
''Product_Details''表 - 无法修改表格。
无法将值NULL插入列''Modified_Date_Time'',表''Vendor Products.dbo.Tmp_Product_Details'';列不允许空值。 INSERT失败。声明已经终止。
所有行都使用Modified_By中的正确值成功更新。和Modified_Date_Time;专栏,所以我不知道为什么我会收到这个错误...无论如何,它似乎是一个新的临时。表是由SQL Server 2008创建的,因为我没有任何名称为Tmp_Orders的表格
任何帮助都表示赞赏。谢谢:)
Hi Friends:
I have a "Product" table in which I want to create a new columns "Modified_By" and "Modified_Date_Time". This columns does not allow nulls.
However, as the database already has data, in order to create this column I had to defined as "allowing nulls". Then, I run a process which updated the new column. The last step was to uncheck the "Allow nulls" property, but when I tried to save the table changes, I got the following error:
''Product_Details'' table - Unable to modify table.
Cannot insert the value NULL into column ''Modified_Date_Time'', table ''Vendor Products.dbo.Tmp_Product_Details''; column does not allow nulls. INSERT fails. The statement has been terminated.
All the rows were succesfully updated with the correct value in the "Modified_By" and "Modified_Date_Time" column, so I don''t know why I get this error...Anyway, it seems like a new "temporary" table was created by SQL Server 2008, because I don''t have any table with the name "Tmp_Orders"
Any help is appreciated..Thanks :)
推荐答案
这篇关于无法在表中插入新列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!