??????????з?????????default???
?????????£?
????alter table ???? alter column ???? ????????
??????????????????С???default???
????(1)???????
????alter table ???? drop constraint ????????
????(2)????????????
????alter table ???? alter column ???? ???????? not null
????(3)???????
????alter table ???? add constraint ???????? primary key (???????1?????????2)
??????????????????У???default???
????(1)???????
????alter table ???? drop constraint ????????
????(2)???default???
????USE ???????
????IF EXISTS (SELECT name FROM sysobjects
????WHERE name = 'default?????'
????AND type = 'D')
????BEGIN
????EXEC sp_unbindefault '?????.???'
????END
????GO
????(3)????????????
????alter table ???? alter column ???? ???????? not null
????(4)???????
????alter table ???? add constraint ???????? primary key (???????1?????????2)
???????????
????(1)?????????????????????????
????declare @name varchar(50)
????select  @name =b.name from sysobjects b join syscolumns a on b.id = a.cdefault
????where a.id = object_id('????')
????and a.name ='????'
????(2)????????????????????????????????????а??????futureonly??
??????????????? def_ssn ???????????????????? ssn?????????? futureonly?????????????? ssn ???????С?
????USE ???????
????EXEC sp_bindefault '????'?? '?????????????'?? 'futureonly'