02 2018 档案

摘要:1.从主从表中查询外键内容(常见问题) 从主从表中查询对应的外键,需要指定外键的表,即sno=》 student.sno或者score.sno 错误:select sno,sname,degree from student,score where student.sno=score.sno; 正确: 阅读全文
posted @ 2018-02-20 21:21 CodeProducter 阅读(147) 评论(0) 推荐(0)
摘要:* 查最高值或者最低值对应行的数据: 查询Score表中的最高分的学生学号和课程号: 两种方法(子查询或者排序): 子查询法:select sno,cno from score where degree = (select max(degree) from score); 分析: 1.查score表 阅读全文
posted @ 2018-02-02 16:13 CodeProducter 阅读(178) 评论(0) 推荐(0)