Reputation: 61
How do I update a column value (varchar(20), not null
) with a "blank" value?
Upvotes: 6
Views: 85179
Reputation: 632
If there have any int column which you may want to do null
Update TABLE_NAME set name = '',id = cast(NULLIF(id,'') as NVARCHAR)
Upvotes: 0
Reputation: 614
Update TableName Set ColumnName='' where [Condtion] // To update column with an enpty values
Upvotes: 6
Reputation: 4210
If you want to update it with NULL
you will need to change it to allow NULL
. Otherwise update with an empty string ""
.
Upvotes: 8