ora-01789:query block has incorrect number of result columns 错误

来源:互联网 发布:MP3音序软件 编辑:程序博客网 时间:2024/05/19 02:41

这种问题一般出现在用UNION将若干个select连接到一起,由于select后的列的个数不相等而造成的。
比如
select userid from usercustom
union
select userid,loginname from usercustom

 

 

正常的使用需要

select userid,'' as ln from usercustom
union
select userid,loginname from usercustom

已满足列数的相等。

 

原创粉丝点击