首先创建两张表 CREATE TABLE Teacher ( Id ,) NOT NULL PRIMARY KEY, Name ) NOT NULL, ); CREATE TABLE Student ( Id ,) NOT NULL PRIMARY KEY, TeacherID INT NOT NULL FOREIGN KEY REFERENCES Teacher(Id), Name ) NOT NULL, Age INT NOT NULL, ); 一张老师表,一张学生表,关系为一对多: IDE…