select * from (select * from A union all select * from B union all select * from C union all select * from D union all select * from E) tb where td.name='abc'