请问:关于表的约束条件该怎么写
我的一个表product中,字段是由多个其他表来约束,这样写可以吗:
alter table product add constraint fk_20 foreign key(name) references list(name),add constraint fk_21 foreign key(handler) references handler(name) on update cascade on delete restrict;
其中:表list中的name是关键字,表handler中的name是关键字。
要求就是当表list中的name和handler中的name更改时,
product中的字段name和handler自动更改;只有当表list和
表handler为空时,product才能删除记录。