我使用sql developer,oracle运行这个sql语句时遇到错误

时间:2015-05-11 15:18:44

标签: sql database oracle

CREATE TABLE ward
(
wardnumber int NOT NULL PRIMARY KEY,
type varchar(50),
name varchar(50),
numberofrooms int
);

CREATE TABLE Patient
(
patientid int NOT NULL PRIMARY KEY,
empssn int,
category varchar(50),
discount int,
firstname varchar(50),
lastname varchar(50),
address varchar(50),
city varchar(50),
birthdate date,
gender varchar(50),
age date,
cellnumber varchar(50),
bednumber int,
roomnumber int,
wardnumber int ,
diseaseid int,
 constraint fk_ward_number foreign key (wardnumber) references ward(wardnumber)on update cascade,
constraint fk_disease_id foreign key (diseaseid) references disease(diseaseid)
); 

我得到以下有关更新级联的事情的错误,我已经尝试了很多但是得到了固定的帮助

  

命令行出错:19列:83错误报告 - SQL错误:   ORA-00905:缺少关键字   00905. 00000 - “缺少关键字”

1 个答案:

答案 0 :(得分:0)

"更新级联,"我不认为有UPDATE级联这样的东西..有一个DELETE级联..但没有UPDATE ...这导致你的错误

http://docs.oracle.com/cd/E11882_01/server.112/e41084/clauses002.htm#CJAIHHGC