有两个表test_1和test_2。使用UPDATE CASCADE约束创建test_2表时。它给了我错误。任何解决方案?
Create table test_1(
test_id numeric(10) NOT NULL,
test_name VARCHAR2(20),
CONSTRAINT test_pk PRIMARY KEY(test_id),
CONSTRAINT test_UQ UNIQUE(test_name));
CREATE TABLE test_2(
test_id1 numeric(20) NOT NULL,
test_name VARCHAR2(20),
CONSTRAINT test2_pk PRIMARY KEY(test_id1),
CONSTRAINT test2_FK FOREIGN KEY(test_name)
REFERENCES test_1(test_name) ON DELETE CASCADE ON UPDATE CASCADE
);