想做一个抓取病历的数据库(商用),病历存在知识产权问题吗
知识产权山东 济南2024-11-21 23:37
律师回复
-
月帮助201720人CREATE TABLE testa(autoid NUMBER,expressionid NUMBER,aaa VARCHAR2(20));CREATE TABLE testb(autoid NUMBER,taskid NUMBER,bbb VARCHAR2(20));alter table TESTA add constraint testa_u1 primary key (AUTOID);alter table TESTB add constraint testb_u1 primary key (AUTOID);alter table TESTA add constraint testa_n1 foreign key (EXPRESSIONID) references testb (AUTOID);alter table TESTB add constraint testb_n1 foreign key (taskid) references testb (AUTOID);INSERT INTO testa VALUES(1,NULL,'aa');INSERT INTO testa VALUES(2,NULL,'aa');INSERT INTO testa VALUES(3,NULL,'aa');INSERT INTO testa VALUES(4,NULL,'aa');INSERT INTO testb VALUES(1,NULL,'bb');INSERT INTO testb VALUES(2,NULL,'bb');INSERT INTO testb VALUES(3,NULL,'bb');INSERT INTO testb VALUES(4,NULL,'bb');UPDATE testa SET expressionid = 3 WHERE autoid = 4;--不报错实测不报错,楼主实际执行的语句,肯定跟上面有差异。根据你的描述,建议检查输入expression是否与update原来的task在同一个事务中。或者先COMMIT输入expression,后update task 原问题:《ORA-02291: integrity constraint () violated - parent key not found。oracle外键约束错误》回复于 2022-11-15 17:13:08