我有一张桌子,结构是
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,
CONSTRAINT "COURSE_ACCREDITED_CON" FOREIGN KEY ("COURSE_ID")
REFERENCES "COURSE" ("COURSE_ID") ENABLE)
当我添加约束时
alter table "COURSE_ACCREDITED" add constraint
"COURSE_ACCREDITED_CON2" foreign key ("ACCREDITATION_BODY_ID") references "COURSE_ACCREDITED" ("ACCREDITATION_BODY_ID")
出现 ORA-02270: 此列列表没有匹配的唯一键或主键
问题是什么?