请问
1,在现有表中为某个字段创建唯一的非聚集索引的约束
2.为表建立一个外键,参考另一张表的某一列
use tempdb
create table t1(
c1 int,c2 int
)
alter table t1 add constraint u_c unique(C1)
create unique index u_i on t1(C2)
---下面是外键
create table t2(
c1 int foreign key references t1(c1)
)
create table t3(
c2 int foreign key references t1(c2)
)