把表数据里面的NULL值都先update成你的默认值再去表的设计界面修改默认值设置
declare @t table(id int primary key,c2 decimal(18,2))declare @i intset @i=1while (@i<5)begininsert into @t(id) values(@i)set @i=@i+1endinsert into @t values(5,8.88)select * from @tupdate @t set c2=9.99 where c2 is nullselect * from @t
[此贴子已经被作者于2007-1-24 9:27:18编辑过]