创建两个表:class和teacher
class表:
teacher表:
alter table class ADD CONSTRAINT fk_teacher_id foreign key (teacher_id) references teacher(t_id);
-- 将class表的字段teacher_id设定为外键 fk_teacher_id ,来关联teacher表中的t_id,
创建两个表:class和teacher
class表:
teacher表:
alter table class ADD CONSTRAINT fk_teacher_id foreign key (teacher_id) references teacher(t_id);
-- 将class表的字段teacher_id设定为外键 fk_teacher_id ,来关联teacher表中的t_id,