MSSQL多字段联合唯一约束
将两个或者多个字段一起约束成一个唯一约束 1 alter table 表名 add constraint 约束名 unique (列名1,列名2)
示例:
ALTER TABLE repo_data.dbo.limit_part_list ADD CONSTRAINT inf UNIQUE(store_no, part_no, proc_no);
将两个或者多个字段一起约束成一个唯一约束 1 alter table 表名 add constraint 约束名 unique (列名1,列名2)
示例:
ALTER TABLE repo_data.dbo.limit_part_list ADD CONSTRAINT inf UNIQUE(store_no, part_no, proc_no);