1 本节内容:
mysql 数据库建表(班级表和学生表)
Create table grade(gid varchar(32) primary key,
gname varchar(32) not null,
gdescribe varchar(300)
);
Create table Student(
sid varchar(32) primary key,
sname varchar(80) not null,
gid varchar(32),
sex char(2)
);
alter table student add constraint fk_student_gid foreign key(gid)
references grade(gid);