语法:
Foreign Key
(column[,...n])
references referenced_table_name[(ref_column[,...n])]
[on delete cascade]
[on update cascade]
注释:
column:列名
referenced_table_name:外键参考的主键表名称
ref_name:外键要参考的表的主键列
on delete:删除级联
on update:更新级联
语法:
Foreign Key
(column[,...n])
references referenced_table_name[(ref_column[,...n])]
[on delete cascade]
[on update cascade]
注释:
column:列名
referenced_table_name:外键参考的主键表名称
ref_name:外键要参考的表的主键列
on delete:删除级联
on update:更新级联