Error starting at line 1 in command:
alter table PLANT_ASSET add constraint fk_plantAsset_plantAssetType foreign key(TYPEID) references PLANTASSET_TYPE(ID) on delete cascade
Error report:
SQL Error: ORA-02298: 无法验证 (USER_BASK_SYS.FK_PLANTASSET_PLANTASSETTYPE) - 未找到父项关键字
02298. 00000 - "cannot validate (%s.%s) - parent keys not found"
*Cause:    an alter table validating constraint failed because the table has
           child records.
*Action:   Obvious

解决方案 »

  1.   

    fk_plantAsset_plantAssetType   这个外键 长度是不是超长了 一般好像不能超过 23 个字符吧 
      

  2.   

    貌视没有超长ORA-02298 cannot validate (string.string) - parent keys not foundCause: An ALTER TABLE ENABLE CONSTRAINT command failed because the table has orphaned child records.Action: Make sure that the table has no orphaned child records before issuing an ALTER TABLE ENABLE CONSTRAINT command. For more information about ALTER TABLE and ENABLE CONSTRAINT, see the Oracle9i SQL Reference.
      

  3.   

    你把主键设成外键了!换一个弄成外键就成了,现在你的typeid为主键吧?自己看下