---(2)
CREATE TABLE Teacher
(
教师编号 int primary key not null,
教师名 varchar(8) not null,
系号 int,
foreign key (系号) references Dept(系号)
)
-----(3)
ALTER TBALE course
ALTER COLUMN 课程编号 NOT NULL
-----(4)
ALTER TABLE grade
ALTER COLUMN 分数 real
-----(5)
ALTER TBALE Student
ADD COLUMN 系号 int ;
ALTER TBALE Student
add constraint FK_student_deptId foreign key(系号)
references Dept(系号)
----(6)
ALTER TBALE course
ADD COLUMN 先修课 char(4),任课教师 ;
ALTER TBALE course
add constraint FK_course_tId foreign key(任课教师)
references Teacher(任课教师)