oracle当多表union时遇到nvarchar2类型时报错 字符集不匹配
对使用nvarchar的地方,加上 to_char( nvarchar 的变量或字段 )
如:
select to_char(name),price from aa
union all
select to_char(name),price from bb
3张表aa,bb,cc都有 name price 字段 查询价格最高的前3位姓名
select * from(select to_char(name),price from aa
union all
select to_char(name),price from bb
union all
select to_char(name),price from cc order by price desc)where rownum<=3