复制代码 代码如下:
Create TABLE STUDENTS (SNO NUMERIC (6, 0) NOT NULL
SNAME CHAR (8) NOT NULL
AGE NUMERIC(3,0)
SEX CHAR(2)
BPLACE CHAR(20)
PRIMARY KEY(SNO))
复制代码 代码如下:
Create TABLE ENROLLS(SNO NUMERIC(6,0) NOT NULL
CNO CHAR(4) NOT NULL
GRADE INT
PRIMARY KEY(SNO,CNO)
FOREIGN KEY(SNO) REFERENCES STUDENTS(SNO)
FOREIGN KEY(CNO) REFERENCES COURSES(CNO)
CHECK ((GRADE IS NULL) or (GRADE BETWEEN 0 AND 100)))
复制代码 代码如下:
Create TABLE GIRL AS Select SNO, SNAME, AGE
FROM STUDENTS Where SEX=' 女 ';
当前1/3页
新闻热点
疑难解答