您好我在尝试创建此表时遇到此错误。你能告诉我如何在更新级联和删除集空约束上使用。
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
答案 0 :(得分:6)
Oracle没有“ON UPDATE CASCADE”。所以解析器期望在你有UPDATE的地方看到DELETE关键字,因为那是唯一应该在该位置跟随ON的关键字。