Python---mysql 外键关联

外键关联:指利用外键将mysql中两个表关联起来。 1.创建study_record 表 注:key fk_student_key (stu_id) 表示与student表创建关联符 stu_id  存在问题 2.查看创建表记录: 3. 查看表结构 4. 添加表数据 注意 :在study_record表中添加数据时,stu_id只能选择在student中的id,否则会出错。 原因:study_re
相关文章
相关标签/搜索