早教吧 育儿知识 作业答案 考试题库 百科 知识分享

消息156,级别15,状态1,第5行关键字'having'附近有语法错误.why?selects.sno,sname,sc.cno,cname,gradefroms,sc,cwheres.sno=sc.snoands.depa='计算机系'andsc.cno=c.cnoorderbysnohavinggrade

题目详情
消息 156,级别 15,状态 1,第 5 行 关键字 'having' 附近有语法错误.why?
select s.sno,sname,sc.cno,cname,grade
from s,sc,c
where s.sno=sc.sno and s.depa='计算机系' and sc.cno=c.cno
order by sno
having grade
▼优质解答
答案和解析
没有分组,不要用Having
select s.sno,sname,sc.cno,cname,grade
from s,sc,c
where s.sno=sc.sno and s.depa='计算机系' and sc.cno=c.cno
and grade