Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQL update to allow null values

I have table in MSSQL that has a column where the value can not be null. But there are update operations where i want to set that column to null when i update the other columns. Is there such a way to achieve this , or should i recreate the table , allowing the column to take null values.

like image 266
kenshin Avatar asked Mar 20 '12 14:03

kenshin


1 Answers

You should allow null for your column: alter table T1 alter column C1 int null

like image 60
oryol Avatar answered Sep 28 '22 20:09

oryol