Oracle union操作时字段类型不一致会报如下错误
--> ORA-01790: expression must have same datatype as corresponding expression
select * from (
SELECT table_name, column_name, data_type,DATA_LENGTH,COLUMN_ID FROM USER_TAB_COLUMNS WHERE table_name =upper('bb_sjb')
UNION
SELECT table_name, column_name, data_type,DATA_LENGTH,COLUMN_ID FROM USER_TAB_COLUMNS WHERE table_name =upper('bb_yzb')
UNION
SELECT table_name, column_name, data_type,DATA_LENGTH,COLUMN_ID FROM USER_TAB_COLUMNS WHERE table_name =upper('bb_zcpgb')
UNION
SELECT table_name, column_name, data_type,DATA_LENGTH,COLUMN_ID FROM USER_TAB_COLUMNS WHERE table_name =upper('bb_hbsjb')
UNION
SELECT table_name, column_name, data_type,DATA_LENGTH,COLUMN_ID FROM USER_TAB_COLUMNS WHERE table_name =upper('bb_bbqtb')
) WHERE COLUMN_NAME IN('ZCZE','XSSR','YYSR')