我对此查询有疑问:
alter table COMMANDER
add foreign key FK_COMMANDE_LIEN_93_CLINET (IDCL)
references CLINET (IDCL) on update restrict on delete restrict;
我收到错误ORA-00906,任何解决方案?
答案 0 :(得分:2)
ALTER TABLE COMMANDER
ADD CONSTRAINT FK_COMMANDE_LIEN_93_CLINET
FOREIGN KEY (IDCL)
REFERENCES CLINET(IDCL);
参考ON UPDATE / DELETE RESTRICT,请参阅:Foreign Key Constraint Issue in Oracle
答案 1 :(得分:1)
试试这个,
ALTER TABLE commander
ADD CONSTRAINT fk_commande_lien_93_clinet FOREIGN KEY (idcl)
REFERENCES clinet (idcl) ON UPDATE RESTRICT ON DELETE RESTRICT;