开发者

How to update a column with a "blank" value

How do I update a column开发者_运维问答 value (varchar(20), not null) with a "blank" value?


If you want to update it with NULL you will need to change it to allow NULL. Otherwise update with an empty string "".


Update TableName Set ColumnName='' where [Condtion] // To update column with an enpty values


If there have any int column which you may want to do null

Update TABLE_NAME set name = '',id = cast(NULLIF(id,'') as NVARCHAR)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜