需要将我的字段之一更改为非null [英] need to change one of my field to not null

查看:168
本文介绍了需要将我的字段之一更改为非null的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Sql server 2008我需要将我的字段之一更改为非null我无法更改它给了我错误,像这样

515消息,第16级,状态2,第1行
无法将值NULL插入表"CaseMS.dbo.DesignFileDiary"的"PICCodeID"列中;列不允许为空. UPDATE失败.
该语句已终止.

Sql server 2008 i need to change one of my field to not null i can''t able to change it gives me error, like this

Msg 515, Level 16, State 2, Line 1
Cannot insert the value NULL into column ''PICCodeID'', table ''CaseMS.dbo.DesignFileDiary''; column does not allow nulls. UPDATE fails.
The statement has been terminated.

推荐答案

看看:
http://searchoracle.techtarget.com/answer/Changing-a-NULL- column-to-NOT-NULL [ ^ ]
have a look at:
http://searchoracle.techtarget.com/answer/Changing-a-NULL-column-to-NOT-NULL[^]


最有可能的是列PICCodeID包含NULL值,并且您正试图使列NOT NULL,
您应该先将列中的NULL值删除,然后再将其设置为NOT NULL列.
Most Probably The Column PICCodeID is containing a NULL value and you are trying to make the Column NOT NULL,
You should remove NULL value(s) from the column before making it a NOT NULL column.


请参见,此错误来自''PICCodeID''不为空.
并为PICCodeID插入空值,请确保PICCodeID的d值不等于null.



从ur应用程序将PICCodeID的一些有效值传递给d数据库.


希望有帮助.
see, this error comes bcoz ur ''PICCodeID'' is not null.
and u r inserting null values for PICCodeID, make sure that, d value of PICCodeID is not equal to null.

OR

Pass some valid value of PICCodeID to d database from ur application.


hope this help.


这篇关于需要将我的字段之一更改为非null的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆