不知道题错哪,希望同学们看看

select stu.sname as 姓名,sc.grade as 成绩
from sc,stu,cou
where cou.cno=sc.cno
and stu.sno=sc.sno
and cou.cname='C语言'
order by 成绩 desc
哪位同学们
看看到底是哪里错了

10-1查询选修c语言的学生

可能存在的错误是你的多表连接字段匹配不存在,三表匹配谁教你的这种写法?你这相当于笛卡尔积操作,一旦数据集大了,系统就跑废了

放题呀,表结构不放出来,谁知道你哪个字段名字填错了

select stu.sname as '姓名',sc.grade as '成绩'
from sc
left join stu on (sc.sno = tu.sno)
left join cou on (sc.cno = cou.cno)
where cou.cname='C语言'
order by sc.grade desc


select stu.sname as 姓名,sc.grade as 成绩
from sc,stu,cou
where cou.cno=sc.cno
and stu.sno=sc.sno
and cou.cname='C语言'
order by sc.grade desc

如果对你有帮忙,麻烦点一个已采纳,谢谢。