- 论坛徽章:
- 0
|
现在在作大作业
有两个查询结果
A:
select exam_student.studentID,
student.loginName,
student.trueName,
student.class
from exam_student,exam,student where exam_student.examID=1 and exam_student.examID=exam.id and exam_student.studentID=student.id group by exam_student.studentID
B:
select answer.studentID,
answer.pageID,
sum(answer.score)
from answer, student where student.id=answer.studentID group by answer.studentID) on atable.exam_student.studentID=btable.answer.studentID;
我想把这两个查询结果左连接成一个查询结果,但语法怎么写都不对,对了结合条件是 A中exam_student.studentID= b中answer.studentID,用的数据库是mysql
求大神指导,不甚感激! |
|