一张成绩表,学生编号,课程,成绩课程有五门:英语,我想查询后这样展示.张三4045454545请教SQL如何写selects.stuname,c1.totalscore,c2.totalscore,c3.totalscore,c4.totalscore,c5.totalscorefromstudentsfulljoin((((
一张成绩表,学生编号,课程,成绩课程有五门:英语,
我想查询后这样展示.
张三4045454545
请教SQL如何写
select
s.stuname,c1.totalscore,c2.totalscore,c3.totalscore,
c4.totalscore,c5.totalscore
from
studentsfulljoin
((((
chengjic1leftjoinchengjic2
onc1.topless=0andc2.topless=1andc1.stu id=c2.stuid)
leftjoinchengjic3
onc3.topless=2andc1.stu id=c3.stuid)
leftjoinchengjic4
onc4.topless=3andc1.stu id=c4.stuid)
leftjoinchengjic5
onc5.topless=4andc1.stu id=c5.stuid)
ons.stu id=c1.stuidwheres.stu id=102
这是我的sql语句但是总是有错误.
没有分数时,仍能查询出值.