select a.相同列1, a.相同列2 from a union select b.相同列1, b.相同列2 from b
SELECT
uid, openId, money, createdTime, currencyId
FROM
`ims_ewei_deduction_log`
union all
select
uid, openId, money, createdTime,currencyId
from
`ims_ewei_recharge_log`
这里需要注意的是:group by
子句和where
子句一样是跟随select
语句后边的, 而 order by
是跟随在整个语句之后的