添加外键的语句

alter table 子表 add constraint 外键约束名 foreign key (子表外键字段) references 父表(父表主键字段)
on update cascade on delete casde

 

Leave a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.