6

How do I update a column value (varchar(20), not null) with a "blank" value?

Juan Mellado
  • 14,973
  • 5
  • 47
  • 54
Avinash
  • 61
  • 1
  • 1
  • 2

3 Answers3

8

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

Louis
  • 4,172
  • 4
  • 45
  • 62
6
Update TableName Set ColumnName='' where [Condtion] // To update column with an enpty values
Nanda
  • 604
  • 8
  • 20
0

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

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

Mitul Panchal
  • 592
  • 5
  • 7