SQL这个错误是什么意思?
答案:2 悬赏:0
解决时间 2021-03-13 22:24
- 提问者网友:送舟行
- 2021-03-13 15:34
SQL这个错误是什么意思?
最佳答案
- 二级知识专家网友:封刀令
- 2021-03-13 16:57
select (select degree from SCORE where SNO=a.sno) as ceishi from STUDENT a其中的(select degree from SCORE where SNO=a.sno) 查询结果为多条记录,所以才会出现这个提示。
1、考虑使用fox xml path方式将多结果转为一个字符串输出
2、这样书写是否正确
1、考虑使用fox xml path方式将多结果转为一个字符串输出
2、这样书写是否正确
全部回答
- 1楼网友:深街酒徒
- 2021-03-13 17:16
就是说,score中,满足每个 student的 score.sno = student.sno的 不止1条 。
不知道你要干什么?
取最大:
select (select max(degree) from SCORE where SNO=a.sno) as ceishi from STUDENT a
取所有
select a.sno,b.degree from SCORE b,STUDENT a where b.SNO=a.sno
不知道你要干什么?
取最大:
select (select max(degree) from SCORE where SNO=a.sno) as ceishi from STUDENT a
取所有
select a.sno,b.degree from SCORE b,STUDENT a where b.SNO=a.sno
我要举报
如以上问答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯