alter table B
--cc是外键约束名,不能重复,也不能是int类型(如1,2,3)
add constraint cc
--B表里的需要约束的字段(id)
foreign key (id)
--A表后的(id)可省略
references A (id)

 

相关文章:

  • 2022-12-23
  • 2021-09-24
  • 2021-07-04
  • 2022-12-23
  • 2022-12-23
  • 2021-12-27
  • 2022-12-23
猜你喜欢
  • 2021-10-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-19
  • 2021-05-15
  • 2021-05-29
相关资源
相似解决方案