一对一关系中 从表的主键是 主表的外键

sql语句

1 create table person(
2     id int primary key,
3     name varchar(100)
4 );
5 create table idcard(
6     id int primary key,
7     num varchar(20),
8     constraint person_id_fk foreign key(id) references person(id)
9 );
View Code

相关文章:

  • 2021-06-18
  • 2022-02-07
  • 2022-02-07
  • 2021-12-05
  • 2022-02-07
  • 2022-02-07
  • 2022-02-05
猜你喜欢
  • 2021-09-11
  • 2021-06-30
  • 2022-02-07
  • 2022-02-07
  • 2022-02-07
  • 2021-11-19
相关资源
相似解决方案