SQL语句:给表添加外键的四种方式

1. 建立表的同时添加外键 create table score( score int(3), st_id int(16), cs_id int(16), primary key(st_id,cs_id), FOREIGN KEY (st_id) REFERENCES student(id), FOREIGN KEY (cs_id) REFERENCES classes(id) ); 2. 已经建
相关文章
相关标签/搜索