select * from (

select 'a' as tableID, * from a

union all

select 'b' as tableID, * from b

) as test

+ Recent posts