合并SQL中的两列

时间:2018-08-13 16:02:38

标签: sql ms-access

我如何使用sql更改表并将列account2,amoun2放在科目和金额列下?我有这样一份报告,我把它们放在前两列下。我正在使用Access的sql视图执行此操作。谢谢

Account Amount Account2 Amount2
1234576  4      1234576    4
4444444  10     4564888    11
456789   2      456789      2
000000   1      1111111     6 

1 个答案:

答案 0 :(得分:2)

您要union all吗?

select account, amount
from t
union all
select account2, amount2
from t;
相关问题