多表查询,字段相同,结果一同显示

select * from zh_log0  where title='张' union all select * from zh_log  where title='张' union all select * from zh_log2  where title='张'

select * from table1 union all select * from table2,union all 是所有的都显示出来,union 是只显示不重复的,如果两个表的字段部分相同,把查询的字段写出来亦可

经验在于积累----武二郎
原文地址:https://www.cnblogs.com/zhanghai/p/4461187.html