创建外键

1 create table student(
2 id int(10) primary key auto_increment,
3 name varchar(20),
4 age int(3),
5 tid int(10),
6 constraint fk_teacher foreign key (tid) references teacher(id)
7 );      名称    
好好学习,天天向上。 努力工作,给自己的和家人一个满意的答案。。。。
原文地址:https://www.cnblogs.com/axu521/p/10104821.html