enter image description here我的SQL查询: -SQL操作进行单列,列
SELECT
(s.Mark*0.8+((i.OutOf)*sum(i.Mark)/9000)+((ai.OutOf)*sum(ai.Mark) /180)+a.Mark)
AS final
from mark_semester s,
mark_assignment ai,
mark_internaltest i,
mark_attendance a,
master_student ms
WHERE s.SubjectId=i.SubjectId and
s.SubjectId=ai.SubjectId
and s.SubjectId=a.SubjectId
and s.SubjectId='1'
AND s.RegNo=i.RegNo
and s.RegNo=ai.RegNo
and s.RegNo=a.RegNo
and s.RegNo=ms.RegNo
and s.RegNo='100'
and s.Semester=i.Semester
and s.Semester=ai.Semester
and s.Semester=a.Semester
and s.Semester='1'
在此查询我要输入多个subjectids
和regnos
获取数据
任何一个可以帮助我解决这个问题。
(1)*不要*的'FROM'子句中使用逗号。 *总是*使用正确的,明确的'JOIN'语法。 (2)我删除了不兼容的数据库标签。 (3)你没有问题。 –
ü可以给我修改后的查询,请 –
可以使用IN子句s.SubjectId在(“1”,“2”,3' )和同为REGNO的 –