您只需要
unpivot子句以垂直显示数据:
with t(a,b,c,d,e,f,g,h,i) as( select 1,2,3,'D','E',2,3,'X','Y' from dual )select a,b,c,val from(select a,b,c,to_char(d) as d, to_char(e) as e, to_char(f) as f, to_char(g) as g, to_char(h) as h, to_char(i) as i from t) unpivot ( val for col in (d,e,f,g,h,i) )order by col
[Demo](https://dbfiddle.uk/?rdbms=oracle_11.2&fiddle=1f2fac3c421caa8259360b1271b97cec)
to_char() 转换是针对获取 ORA-01790 而实现的 : 表达式必须具有与相应表达式 错误 相同的数据类型 。



