我正在尝试创建表,但表ROUTE发生错误。我不知道为什么。你能指出我的问题吗?谢谢。
create table LOCATION (
airportCode VARCHAR2(10) not null,
country VARCHAR2(15) not null,
address VARCHAR2(50) not null,
PRIMARY KEY(airportCode));
create table ROUTE (
routeID VARCHAR2(10) not null,
airportCode VARCHAR2(10) not null,
description VARCHAR2(100) not null,
PRIMARY KEY(routeID, airportCode)
FOREIGN KEY(airportCode) REFERENCES LOCATION(airportCode));
此错误即将发生,ORA-00907:缺少右括号。所有括号都已正确放置但仍显示此错误。
PRIMARY KEY(routeID, airportCode)
and FOREIGN KEY(airportCode)
之间有一个(逗号)缺失