oralce 在使用union all,如以下SQL时,会出现"字符集不匹配"错误
select a.x as x, a.y as y, a.z as z from a
union all
select ' ' as x, ' ' as y, b.z as z from b;
解决办法:都用to_char转成字符串
select to_char(a.x) as x, to_char(a.y) as y, a.z as z from a
union all
select to_char(' ') as x, to_char(' ') as y, b.z as z from b;