17,090
社区成员
发帖
与我相关
我的任务
分享
OPER@tl>create table test(aaa number,bbb number,primary key(aaa,bbb));
表已创建。
OPER@tl>create table test2(aaa number references test(aaa));
create table test2(aaa number references test(aaa))
*
第 1 行出现错误:
ORA-02270: 此列列表的唯一关键字或主键不匹配
OPER@tl>alter table test add constraint xx unique(aaa);
表已更改。
OPER@tl>create table test2(aaa number references test(aaa));
表已创建。
OPER@tl>