from
(
select 'A' as tb,aid id,aman man,logindate ,remark
from a
where aman='111'
union all
select 'B',bid,bman,logindate,'' --如果你的“空”是指null,就把这里的''换成null
from b
where bman='111'
)a
order by logindate desc
------解决方案-------------------- union all
留意注释
select id,man,logindate ,remark
from
(
select aid id,aman man,logindate ,remark
from a
where aman='111'
union all
select bid,bman,logindate,'' --如果你的“空”是指null,就把这里的''换成null
from b
where bman='111'
)a
order by logindate desc