我是mysql的初学者。。正在尝试执行我的第一个引用,但无法在mysql workbench(错误3730)中运行,也无法在orakle的live sql上运行(缺少右括号)。这是我的密码:
CREATE TABLE Customer(
CustNo CHAR(4) NOT NULL,
CustName varchar(30) NOT NULL,
Adress varchar(20) NOT NULL,
Internal boolean NOT NULL,
Contact varchar(30) NOT NULL,
Phone INT(7) NOT NULL,
City varchar(10) NOT NULL,
State CHAR(2) NOT NULL,
Zip INT(6));
CREATE TABLE Facility(
FacNo CHAR(4) NOT NULL,
FacName varchar(30) NOT NULL,
CONSTRAINT FacilityPK PRIMARY KEY (FacNo) );
CREATE TABLE Location(
LocNo CHAR(4) NOT NULL,
FacNo CHAR(4) NOT NULL,
LocName VARCHAR(20) NOT NULL,
CONSTRAINT LocationFK FOREIGN KEY (FacNo) REFERENCES Facility (FacNo));
暂无答案!
目前还没有任何答案,快来回答吧!