0
在爲主鍵創建約束時,我收到Movie表的右括號錯誤(在最後列出)。這怎麼能被構建得更好?缺少右括號錯誤
create table Director
(DirectorID number (10,0),
DirectorName varchar2 (30),
DirectorBio varchar2 (300),
constraint DirectorID_PK primary key(DirectorID));
create table Actor
(ActorID number (10,0),
ActorName varchar2 (30),
ActorBio varchar2 (300),
constraint ActorID_PK primary key(ActorID));
create table Award
(AwardID number (10,0),
ActorID number (10,0),
DirectorID number (10,0),
AwardName varchar2 (20),
AwardType varchar2 (20),
AwardDate number (4,0),
constraint ActorID_FK foreign key (ActorID) references Actor(ActorID),
constraint DirectorID_FK foreign key (DirectorID) references Director(DirectorID));
create table Distributor
(DistributorID number (10,0),
CompanyName varchar2 (30),
Address1 varchar2 (30),
Address2 varchar2 (30),
City varchar2 (20),
State varchar2 (2),
Zipcode number (7,0),
PhoneNumber number (10,0),
Email varchar2 (20),
Homepage varchar2 (100),
constraint DistributorID_PK primary key(DistributorID));
create table Movie
(MovieID number (10,0),
ActorID number (10,0),
DirectorID number (10,0),
Title varchar2 (30),
Genre varchar2 (20),
Year number (4,0),
AwardID number (10,0),
Rating varchar2 (4),
QuantityPerUnit number (10,0),
UnitsInStock number (10,0),
Length number (10,0),
MovieType varchar2 (20),
DistributorID number (10,0)
constraint MovieID_PK primary key(MovieID),
constraint ActorID_FK foreign key (ActorID) references Actor(ActorID),
constraint AwardID_FK foreign key (AwardID) references Award(AwardID),
constraint DistributorID_FK foreign key (DistributorID) references Distributor(DistributorID),
constraint DirectorID_FK foreign key references Director(DirectorID));
您的編輯很明顯。 +1 – ElefantPhace 2013-03-05 02:56:01