使用DB2数据库
colum1 column2
---------------
1 A
2 B
需要这样的输出:
colum3
-------
1
2
A
B
答案 0 :(得分:2)
你可以使用UNION ALL
:
SELECT cast(colum1 as varchar) AS colum3 FROM table
UNION ALL
SELECT cast(colum2 as varchar) AS colum3 FROM table