侧边栏壁纸
博主头像
落叶人生博主等级

走进秋风,寻找秋天的落叶

  • 累计撰写 130562 篇文章
  • 累计创建 28 个标签
  • 累计收到 9 条评论
标签搜索

目 录CONTENT

文章目录

mysql操作-外键

2024-05-10 星期五 / 0 评论 / 0 点赞 / 77 阅读 / 337 字

1.创建外键,关联两个表create table score( id int not null auto_increment, subject char(32) not null,

1.创建外键,关联两个表

create table score(    id int not null auto_increment,    subject char(32) not null,    stu_id int not null,    primary key(id),    key fk_stu_key (stu_id),    constraint fk_stu_key foreign key (stu_id) references student (stu_id));

广告 广告

评论区