Mysql
 sql >> Base de Dados >  >> RDS >> Mysql

MYSQL - Concatenar duas tabelas

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

Você pode (ou não) precisar fazer algo sobre os ids não serem únicos, como
select 'Student', table_a.* from table_a where actid = 17
union all
select 'Faculty', table_b.* from table_b where actid = 17