mysql外键约束的语句

alter table + 表名1 add constraint + 外键名字 + foreign key(列名1) references 表名2(列名2);

表名1 为要生成外键的表 表名2为表名1关联的另外一张表

猜你喜欢

转载自blog.csdn.net/qq_39445165/article/details/80545975