0

嗨,我在尝试创建此表时收到此错误。你能告诉我如何在更新级联和删除集空约束上使用。

SQL> create table emp3
  2  (
  3  Fname               varchar2(15)not null,
  4  Minit               char,
  5  Lname               varchar(15) NOT NULL,
  6  Ssn                 char(9)     NOT NULL,
  7  Bdate               DATE,
  8  Address             varchar(30),
  9  Sex                 char,
 10  Salary              decimal(10,2),
 11  Super_ssn           char(9) not null,
 12  Dno                 int    default 1 not null,
 13  CONSTRAINT employee PRIMARY KEY (ssn),
 14  CONSTRAINT employeeSUPER FOREIGN KEY(Super_ssn) REFERENCES emp3(Ssn) ON UPD
ATE CASCADE  ON DELETE SET NULL );
CONSTRAINT employeeSUPER FOREIGN KEY(Super_ssn) REFERENCES emp3(Ssn) ON UPDATE C
ASCADE  ON DELETE SET NULL )
                                                                        *
ERROR at line 14:
ORA-00905: missing keyword
4

1 回答 1

6

Oracle 没有“ON UPDATE CASCADE”。所以解析器期望在你有 UPDATE 的地方看到 DELETE 关键字,因为那是在那个位置应该跟随 ON 的唯一关键字。

于 2009-02-18T20:09:20.960 回答