注册 登录
编程论坛 SQL Server论坛

编程语句报错

凌木子 发布于 2017-10-22 12:28, 1997 次点击
use product
go
select  sno,sname,cno,grade
from student inner join sc on student.sno=sc.sno
where Cno=1
order by grade desc
go
红字提示:无法绑定由多个部分组成的标识符“student.sno”
1 回复
#2
mywisdom882017-10-24 11:59
-- 多表操作时,要指定字段数那个表的,如:
-- student(sNo,sName,cNo,Grade)
-- score(sNo,nScore)
select st.sNo,st.sName,,st.Grade,sc.nScore
from student st
inner join score sc on st.sNo=sc.sNo
where cNo='1'
1