34,590
社区成员
发帖
与我相关
我的任务
分享
create table tb1 (nameid int)
alter table tb1
alter column nameid int not null
alter table tb1
add CONSTRAINT taoistong1 default(-1) for nameid
create table tt
(
id int,
nn int
)
alter table tt alter column id int not null
ALTER TABLE tt
ADD CONSTRAINT tt_id_def
DEFAULT -1 FOR id
if object_id('tb') is not null drop table tb
go
create table tb (nameid int)
alter table tb alter column nameid int not null
alter table tb add constraint df_nameid default(-1) for nameid