创建学生表
create table student(
id int,
name varchar(20),
sex char(2),
age int,
dept varchar(30),
primary key(id)
);
创建课程表
create table course(
id int,
name varchar(30),
pid int,
credit it,
primary key(id),
foreign key(pid) references course(id)
);
时间: 2024-10-18 16:40:41