说我sql字符串错误,是不是过长,怎么修改,我改了又出现了sql语法错误!
select AVG(grade) from Score where sno in(select SNO from Student where SCLASS=(select SCLASS from Student where SNO='96001')) and cno=(select CNO from Course where CNAME='数学分析')
就是这句话,开始说我字符串错误,后面分割了,又说我在in 和 and 附近有错误!
怎么改。。。。。。。。。。。
------解决方案----------------------你的语句应该这样简化
select AVG(grade)
from Score a
inner join Student b on a.sno=b.sno
inner join Course c on a.cno=c.cno
where b.sno='96001' and c.CNAME='数学分析'