ORA-02256:引用列数必须与引用列匹配 [英] ORA-02256: number of referencing columns must match referenced columns

查看:95
本文介绍了ORA-02256:引用列数必须与引用列匹配的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

数据库:ORACLE 10克

 <pre lang="sql"><br />
Create table form1 (empcid varchar2 (25), empshare varchar2 (10), empedoj date, constraint pkform1 primary key (empcid, empshare, empedoj));<br />
<br />
create table sharecapital(loanid varchar2(25), loandt date,empshare varchar2(10),empedoj date, constraint fkform1 foreign key (empshare,empedoj) references form1);<br />
<br />
I need to use only empshare and empedoj in sharecapital table. But shows<br />
<br />
ORA-02256: number of referencing columns must match referenced columns<br />
So kindly help me to solve this problem<br />
thanks in advance<br />
</pre> 

解决方案

ORA-02256:引用列数必须与引用列匹配
该错误仅表示:外键引用列表中的列数不等于引用列表中的列数.
解决方法:确保引用列与引用列匹配.

此处为高分辨率的详细信息 [ ^ ].
此处的示例详细信息 [ ^ ]

ccccccccccccccccccccccccccccccccccccccchhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuutttttttttttttttttttttttttttttttttttttttttttttttttttttttttttiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee

DATABASE : ORACLE 10g

 <pre lang="sql"><br />
Create table form1 (empcid varchar2 (25), empshare varchar2 (10), empedoj date, constraint pkform1 primary key (empcid, empshare, empedoj));<br />
<br />
create table sharecapital(loanid varchar2(25), loandt date,empshare varchar2(10),empedoj date, constraint fkform1 foreign key (empshare,empedoj) references form1);<br />
<br />
I need to use only empshare and empedoj in sharecapital table. But shows<br />
<br />
ORA-02256: number of referencing columns must match referenced columns<br />
So kindly help me to solve this problem<br />
thanks in advance<br />
</pre> 

解决方案

ORA-02256: number of referencing columns must match referenced columns
The error simply means: The number of columns in the foreign-key referencing list is not equal to the number of columns in the referenced list.
Resolution: Make sure that the referencing columns match the referenced columns.

Details here with resolution[^].
Details with example here[^]


ccccccccccccccccccccccccccccccccccccccchhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuutttttttttttttttttttttttttttttttttttttttttttttttttttttttttttiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee


这篇关于ORA-02256:引用列数必须与引用列匹配的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆