您的位置:首页 > 博客中心 > 数据库 >

解决java.sql.SQLException: ORA-01789: query block has incorrect number of result columns

时间:2022-03-10 17:44

这种问题一般出现在用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

已满足列数的相等。

解决java.sql.SQLException: ORA-01789: query block has incorrect number of result columns,布布扣,bubuko.com

热门排行

今日推荐

热门手游