CREATE TABLE Job History
(JobID INT REFERENCES Jobs(JobID),
IDNum INT REFERENCES Employees(IDNum),
StartDate DATE
);
向我抛出以下错误:ORA-00922: missing or invalid option
我做错了什么?
如果表名中有空格,则应将其用双引号括起来,如下所示:
CREATE TABLE "JOB HISTORY" (
JOBID INT REFERENCES JOBS ( JOBID ),
IDNUM INT REFERENCES EMPLOYEES ( IDNUM ),
STARTDATE DATE
);
在表名中包含空格是不好的做法。相反,您可以使用_来分隔表中的单词,如:JOB_HISTORY