本文介绍了ORA-02256:引用列数必须与引用列匹配的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
<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>
解决方案
<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:引用列数必须与引用列匹配的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!