How can we help you today? How can we help you today?

Multiple constraints, the format becomes messy

before:
alter table 工料对照
add constraint ck_工料对照_工序分类编码检查 check (工序分类编码 like '0[1-8]'),
constraint ck_工料对照_父物料编码检查 check(父物料编码 like '01%'),
constraint ck_工料对照_物料编码检查 check(物料编码 like '01%'),
constraint ck_工料对照_分类检查 check(left(父物料编码,4)=left(物料编码,4)),
constraint fk_工料对照_工序分类 foreign key (工序分类编码) references 工序分类(工序分类编码),
constraint fk_工料对照_Inventory_父物料编码 foreign key (父物料编码) references Inventory(cInvCode),
constraint fk_工料对照_Inventory_物料编码 foreign key (物料编码) references Inventory(cInvCode);
zhiyounet
0

Comments

1 comment

  • zhiyounet
    Hope for a number of constraints, the conditions can not format, this is actually better.
    zhiyounet
    0

Add comment

Please sign in to leave a comment.