标签:
建表时设置外键 create table grade (id int , grade int, constraint id_fk foreign key (id) references student (id)); 添加外键 alter table grade add constraint id_fk foreign key (id) references student (id);
Sql语句
原文地址:http://my.oschina.net/onlytwo/blog/421937