亲爱的所有错误代码如下:当子查询未引入EXISTS时,只能在选择列表中指定一个表达式。 [英] Dear all what is the error on below Code:Only one expression can be specified in the select list when the subquery is not introduced with EXISTS.
本文介绍了亲爱的所有错误代码如下:当子查询未引入EXISTS时,只能在选择列表中指定一个表达式。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
亲爱的所有错误代码如下:当子查询未引入EXISTS时,只能在选择列表中指定一个表达式。
Dear all what is the error on below Code:Only one expression can be specified in the select list when the subquery is not introduced with EXISTS.
SELECT ID,firstName FROM human u WHERE fatherID IN(
SELECT ID,firstName FROM human h WHERE fatherID IN
(SELECT ID,firstName FROM human u WHERE ID = 2)
)
我需要一个帮助
I NEED A HELP
推荐答案
您的子查询返回多个col UMN。它应该只返回一列。除此之外,我在这里看不到使用子查询的意义。这不应该给出你期望的结果:
Your sub query is returning more than one column. It should be returning only one column. That aside, I do not see a point of using sub query here. Shouldn't this give the result you expect:
SELECT ID, FIRSTNAME FROM HUMAN WHERE FATHERID=2
您还应该尝试阅读指南以提问。主题应该是精确的而不是整个问题本身。
You should also try and read guidelines to ask question. Subject should be precise and not entire question itself.
正确的查询是:
The proper query is:
SELECT ID, firstName
FROM human AS U WHERE U.ID = 2
我强烈建议您阅读一些教程,例如: http://www.w3schools.com/sql/ [ ^ ]
这篇关于亲爱的所有错误代码如下:当子查询未引入EXISTS时,只能在选择列表中指定一个表达式。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文