我目前正在做一些SQL课程,到目前为止这是我的代码:
CREATE TABLE VEHICLES
(
Vehicle_id VARCHAR(6) PRIMARY KEY NOT NULL,
Vehicle_Make VARCHAR(18),
Vehicle_Model VARCHAR(25),
Passenger_Number INT,
Number_Owned INT,
Registration_Date DATE, NOT NULL UNIQUE
Colour VARCHAR(10),
Rate INT
);
每次我尝试运行它给我的声明
SQL错误:ORA-00904:标识符无效
答案 0 :(得分:1)
你的错误地方有逗号。
在此更正:
CREATE TABLE VEHICLES
(
Vehicle_id VARCHAR(6) PRIMARY KEY NOT NULL,
Vehicle_Make VARCHAR(18),
Vehicle_Model VARCHAR(25),
Passenger_Number INT,
Number_Owned INT,
Registration_Date DATE NOT NULL UNIQUE,
Colour VARCHAR(10),
Rate INT
);