我正在努力完成我的实验室,但我找不到丢失的右括号,它说我失踪了。我已经完成了课程表,一切都是正确的,但是我在其他每个表上都出现错误,有人可以帮忙吗?
CREATE TABLE COURSE(
CRS_CODE VARCHAR(8) NOT NULL,
CRS_DESCRIPTION VARCHAR(35) NOT NULL,
CRS_CREDIT INTEGER DEFAULT 4 NOT NULL CHECK(CRS_CREDIT IN (1,2,3,4)),
PRIMARY KEY (CRS_CODE));
CREATE TABLE CLASS (
CRS_CODE VARCHAR(8) NOT NULL,
CLASS_CODE INTEGER (5) NOT NULL,
CHECK (CLASS_SECTION IN (0,1,2,3,4,5,6,7,8)),
CLASS_TIME VARCHAR(25) NOT NULL,
CLASS_ROOM CHAR(6),
CRS_CODE REFERENCES COURSE(CRS_CODE),
PRIMARY KEY (CLASS_CODE));
CREATE TABLE STUDENT(
STU_NUM INTEGER NOT NULL,
STU_LNAME VARCHAR(25) NOT NULL,
STU_FNAME VARCHAR(20) NOT NULL,
STU_INIT VARCHAR(1),
STU_DOB DATE,
STU_HRS INTEGER DEFAULT 0 CHECK (STU_HRS>=0 AND STU_HRS<1000),
STU_CLASS VARCHAR(2) CHECK (STU_CLASS IN ('Fr', 'So', 'Jr', 'Sr', 'Gr')),
STU_GPA DECIMAL(3,2) DEFAULT 0.00 CHECK (STU_GPA BETWEEN 0.00 AND 4.00),
STU_PHONE INTEGER(4),
PRIMARY KEY (STU_NUM));
CREATE TABLE ENROLL(
ENROLL_GRADE VARCHAR(1) DEFAULT 'Z' CHECK (ENROLL_GRADE IN('A','B','C','D','F','I','W','Z')),
STU_NUM INTEGER REFERENCES STUDENT(STU_NUM),
CLASS_CODE INTEGER (5) REFERENCES CLASS(CLASS_CODE));