外键约束:
格式:
alter table 表名 add constraint 约束名称 约束类型 (列名) references 被引用的表名称 (列名)

例子:
alter table emp add constraint jfkdsj foreign key (did) references dept (id);

 

外键约束

相关文章: