我想添加一个引用该列本身的外键
FOREIGN KEY ACCREDITATION_BODY_ID NOT NULL REFERENCES
ACCREDITATION_BODY_LOOK_UP(ACCREDITATION_BODY_ID),
表中的SQL是:
CREATE TABLE "COURSE_ACCREDITED"
("COURSE_ID" VARCHAR2(50) NOT NULL ENABLE,
"ACCREDITATION_BODY_ID" VARCHAR2(50) NOT NULL ENABLE,
"DATE_OBTAINED" VARCHAR2(50),
PRIMARY KEY ("COURSE_ID", "ACCREDITATION_BODY_ID", "DATE_OBTAINED") ENABLE)
当我添加这个外键时,它出现 ORA-02270: no matching unique or primary key for this column-list
问题是什么?