我是 MySQL 新手,所以如果我的问题缺少信息,请告诉我,
我有一个工作正常的查询:
select au.email, sm.created, sm.grade, sm.max_grade
from auth_user au, courseware_studentmodule sm
where sm.student_id = au.id
and course_id = 'MyCourse'
and sm.module_type = 'problem';
但是当我想从不同的表中添加另一列时:
select au.email, sm.created, sce.created , sm.grade, sm.max_grade
from auth_user au, courseware_studentmodule sm, student_courseenrollment sce
where sm.student_id = au.id and sm.student_id = sce.id
and course_id = 'MyCourse'
and sm.module_type = 'problem';
我收到这个错误
ERROR 1052 (23000): Column 'course_id' in where clause is ambiguous
有谁知道为什么?
谢谢