日期:2014-05-16 浏览次数:20741 次
create table tb
(id int not null,
name varchar(10) not null,
pid int null,
constraint PK_tb primary key nonclustered (id)
)
go
alter table tb
add constraint FK_self foreign key (pid)
references tb (id)
go
alter table tb
add constraint CHK_tb CHECK(pid<>id)