外键未在oracle中使用主键更新

时间:2015-05-11 18:16:36

标签: oracle

我正在使用oracle 11g r2 Express Edition和SQL Command line。当我更新主键没有更新外键时,我遇到了问题。有什么解决方案吗?

这是我的2桌的命令

CREATE TABLE staff(staff_id number(5) not null primary key);

CREATE TABLE customer(customer_id number(5) not null primary key,staff_id number(5) not null references staff);

1 个答案:

答案 0 :(得分:0)

你究竟做了什么? 你的SQL语句是什么?

您是否将主键更新为与customer表中的某些行一致的值?您确定客户表中有相应的行吗?

相关问题