SQL错误:ORA-00906:缺少左括号00906. 00000 - “缺少左括号”

时间:2015-03-19 15:18:23

标签: sql oracle

我一直在尝试使用在另一个表中引用的外键来创建此表。我创建的主表如下所示:

 CREATE TABLE Concert(
 concertDate Date not null,
 startTime number not null,
 venueHall varchar(50) CONSTRAINT concert_pk REFERENCES Venue(VenueHall),
 finishTime number,
 orchestraName varchar(50) CONSTRAINT concert_fk REFERENCES Orchestra(orchestraName),
 orchestraFee number not null,
 PRIMARY KEY (concertDate,startTime,venueHall));  

我试图创建的表也显示在下面(我更改了代码并定义了列):

   CREATE TABLE ConcertStandin(
   concertDate Date not null,
   startTime number not null,
   venueHall varchar(50) not null,
   musicianNo number not null,
   standinFee number,
   PRIMARY KEY(concertDate,startTime,venueHall,musicianNo),
   FOREIGN KEY concertDate REFERENCES Concert(concertDate),
   FOREIGN KEY startTime REFERENCES Concert(startTime),
   FOREIGN KEY venueHall REFERENCES Venue(venueHall),
   FOREIGN KEY musicianNo REFERENCES Musician(musicianNo));

但是,我一直得到同样的错误:      错误报告 -       SQL错误:ORA-00906:缺少左括号      00906. 00000 - “缺少左括号”(此错误在外键音乐会日期行上)

关于如何解决此问题的任何帮助?

由于

0 个答案:

没有答案