sql >> Base de Datos >  >> RDS >> Mysql

cómo combinar y ordenar dos tablas diferentes juntas en Mysql

Básicamente, necesitas union all :

select id, username, firstname, event_date
from ((select id, username, firstname, event_date
       from tablea
      ) union all
      (select id, username, NULL as firstname, event_date
       from tablea
      )
     ) t
order by event_date;