ORA-01789: query block has incorrect number of result columnsYou may see this error in the following situation:
create table test1_1789 (Table test2_1789 contains one column too many.
col_a varchar2(30),
col_b number,
col_c date);
create table test2_1789 (
col_a varchar2(30),
col_c number,
col_b date,
col_d char(1));
select * from test1_1789
union all
select * from test2_1789;
ORA-01789: query block has incorrect number of result columns
This fact becomes a problem because we are using * as column list specifier and it can be avoided by specifying an explicit list of columns common to both tables.
See message translations for ORA-01789 and search additional resources.
No comments:
Post a Comment