更新时间:2022-11-08 18:27:33
问题在这里:
add foreign key(txtAC_tag) references tblaircrafts(txtAC_tag);
在这里,您以外键关系将txtAC_tag
绑定到tblaircrafts
表的txtAC_tag
,但是在tblaircrafts
中,列txtAC_tag
既不是unique
也不是primary
,这就是它显示错误的原因.
here you are binding txtAC_tag
to txtAC_tag
of tblaircrafts
table in a foreign key relationship but in tblaircrafts
the column txtAC_tag
is neither unique
nor primary
that's why it is showing error.
对于外键关系,要在其上创建关系的父表列必须为unique
或primary
,并且它们也必须具有相同的数据类型.
For foreign key relationship the parent table column on which you are creating relation must be unique
or primary
and they must have the same datatype also.
要解决此问题,请使txtAC_tag
列唯一.
To resolve this make txtAC_tag
column unique.