专题文章
时长:00:00更新时间:2020-11-09 09:07:27
准备。定义一个教师表、一个学生表;在学生表中引用教师表ID。,create table teachers(teacherID int not null auto_increment primary key,teacherName varchar(8));create table students(studentID int not null auto_increment primary key,teacherID int not null,studentName varchar(8)。第一步。插入一个老师;insert into teachers(teacherName) values(';NameA';);。插入一个学生。
查看详情