aiaiDBA

加微信获取免费职业规划+学习资料,了解年薪50万的DBA是如何练成的

13718043309

010-86462881

PLS-00406: length of SELECT list in subquery must match number of assignment targets

PLS-00406: length of SELECT list in subquery must match number of assignment targets
Cause: A query select list is not the same length as the list of targets that will receive the returned values. For example, the following statement is faulty because the subquery returns two values for one target: UPDATE emp SET ename = (SELECT ename, empno FROM emp WHERE ename = 'SMITH') ...
Action: Change one of the lists so that they contain the same number of items.

请先 登录 后评论

1 个回答

小智
PLS-00406:子查询中的SELECT列表的长度必须与分配对象的数目相匹配,
.原因:查询选择列表与将接收返回值的目标列表的长度不同。例如,以下语句是故障的,因为子查询为一个目标返回两个值:UPDATE emp SET ename =(SELECT ename,empno FROM emp WHERE ename ='SMITH')...,
.操作:更改其中一个列表,使其包含相同数量的项目。,
.
请先 登录 后评论