2017-04-21 30 views

回答

7

您可以使用union all。如果您關心訂購:

select id, x 
from ((select id, x, 1 as n from t) union all 
     (select id, y, 2 as n from t) 
    ) xy 
order by id, n; 

如果您不關心訂購,那麼union all就足夠了。

+0

非常感謝。適用於我 –