我创建了这两个表。他们是超级员工的一部分。当试图在oracle中创建这些表时,我收到错误
ORA-00907:缺少右括号
我不确定为什么会收到此错误。任何人都可以指出我的错误吗?
Firstaiders表
DROP TABLE Firstaiders;
CREATE TABLE Firstaiders(
Staff_ID NUMBER NOT NULL,
CONSTRAINT pk_Firstaiders PRIMARY KEY (Staff_ID),
FOREIGN KEY(Staff_ID) REFERENCES Staff(Staff_ID) ON DELETE CASCADE ON UPDATE CASCADE
);
安全表
DROP TABLE Security;
CREATE TABLE Security(
Staff_ID NUMBER NOT NULL,
Security_ID NUMBER,
CRB_CHECK VARCHAR2(8),
fk1_Stage_ID NUMBER NOT NULL,
CONSTRAINT pk_Security PRIMARY KEY (Staff_ID),
FOREIGN KEY(Staff_ID) REFERENCES Staff(Staff_ID) ON DELETE CASCADE ON UPDATE CASCADE
);
答案 0 :(得分:0)
删除Oracle中不直接支持的List<String> myList = source.stream()
.map(i -> (i.get(bar) instanceof JSONObject ? i.getJSONObject(attribute).get("key") : i.get(bar)).toString())
.collect(Collectors.toList());
。
例如:
ON UPDATE CASCADE
Oracle希望在CREATE TABLE Firstaiders(
Staff_ID NUMBER NOT NULL,
CONSTRAINT pk_Firstaiders PRIMARY KEY (Staff_ID),
FOREIGN KEY(Staff_ID) REFERENCES Staff(Staff_ID) ON DELETE CASCADE);
后使用右括号,但会发现ON DELETE CASCADE
导致ON UPDATE CASCADE