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

MYSQL - Concatenar dos tablas

select * from table_a where actid = 17
union all
select * from table_b where actid = 17

Es posible que deba (o no) hacer algo para que las identificaciones no sean únicas, como

select 'Student', table_a.* from table_a where actid = 17
union all
select 'Faculty', table_b.* from table_b where actid = 17