参照约束违规:插入teradata时无效的外键值

时间:2015-03-23 17:28:18

标签: foreign-keys

表定义:

create set table admin
( 
employee char(36) not null
)
constraint abc Primary key (employee);

create set table user
(
employee char(36) not null
employee_address char(36) not null
)admin(
constraint aaa primary_key(employee,employee address)
constraint cde foreign key(employee) references admin(employee);

问题:

尝试将数据插入表User时,面临错误

Referential constraint violation: invalid Foreign Key value

检查数据,发现正在引用的外键存在于admin表中..

非常感谢一些帮助!!

0 个答案:

没有答案