Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 new column without null

Author  Topic 

dnf999
Constraint Violating Yak Guru

253 Posts

Posted - 2008-10-24 : 10:58:29
Hi

Is there a way when I add for instance a numeric column to table it all does not default to null?

i.e.
Alter Table Table1 add column Col4 numeric(10)

Basically I would like these values to be blank, rather than null if possible...


Thanks...

hanbingl
Aged Yak Warrior

652 Posts

Posted - 2008-10-24 : 11:00:41
alter table tab1 add col4 numeric(10) not null default 0
Go to Top of Page
   

- Advertisement -