i'm using oracle 11g r2 Express Edition and SQL Command line. i'm getting problem when i update the primary key the foreign key did not update. is there any solution?
我正在使用oracle 11g r2 Express Edition和SQL Command line。当我更新主键没有更新外键时,我遇到了问题。有什么办法吗?
this is the command for my 2 table
这是我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 个解决方案
#1
What exactly did you do? What is your SQL statement?
你究竟做了什么?你的SQL语句是什么?
Did you updated the primary key to a value that is consistent with some row in the customer table? Are you sure there was a corresponding row in the customer table?
您是否将主键更新为与customer表中的某些行一致的值?您确定客户表中有相应的行吗?
#1
What exactly did you do? What is your SQL statement?
你究竟做了什么?你的SQL语句是什么?
Did you updated the primary key to a value that is consistent with some row in the customer table? Are you sure there was a corresponding row in the customer table?
您是否将主键更新为与customer表中的某些行一致的值?您确定客户表中有相应的行吗?