每一个外键值都应该与主表中的主键值相对应
如:foreign key(deptid) reference dept(depton)
期中dept 是主表 ,主表一定要有主键,而depton 就是主键
从表对主键没有要求