select
t1.city_name
from
(
select
'全國' as city_name
from
stg.t_vip
union all
select
cc.city_name
from
stg.t_city_config cc
join
stg.t_vip v
on
v.city_id = cc.city_id
) t1
full join
(
select
'全國' as city_name
from
stg.t_vip_trade
) t2
on
t1.city_name = t2.city_name;
select
t1.city_name
from
(
select
'全國' as city_name
from
stg.t_vip
union all
select
cc.city_name
from
stg.t_city_config cc
) t1
full join
(
select
'全國' as city_name
from
stg.t_vip_trade
) t2
on
t1.city_name = t2.city_name;
爲什麼第二次SQL是OK,而第一個發佈一個錯誤:Org.Apache.calcite.runtime.CalciteException:在字符集 'ISO-8859-1' 無法編碼 '全國'
Failed to encode '全國' in character set 'ISO-8859-1'