admin

SQL查询使列结果成行

sql

我正在使用报告服务制作报告图。但是我的数据看起来像这样:

Table1
    C01    C02   C03   C04
    1      2     3     4

I need to do a sql query to return data that looks like this:
    Any_Col_name
    1
    2
    3
    4

我正在将MS Reporting Services与Oracle DB配合使用。我无法重组表。


阅读 194

收藏
2021-07-01

共1个答案

admin

select c01 from table
union all
select c02 from table
union all
select c03 from table
union all
select c04 from table
2021-07-01