1.从主从表中查询外键内容(常见问题)
从主从表中查询对应的外键,需要指定外键的表,即sno=》 student.sno或者score.sno
错误:select sno,sname,degree from student,score where student.sno=score.sno;
正确:select student.sno,sname,degree from student,score where student.sno=score.sno;
1.从主从表中查询外键内容(常见问题)
从主从表中查询对应的外键,需要指定外键的表,即sno=》 student.sno或者score.sno
错误:select sno,sname,degree from student,score where student.sno=score.sno;
正确:select student.sno,sname,degree from student,score where student.sno=score.sno;
原文:https://www.cnblogs.com/laoniaofly/p/8455835.html