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;
Why the second SQL is OK while the first one post an error:
Failed to encode '全国' in character set 'ISO-8859-1'