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

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 是只显示不重复的,如果两个表的字段部分相同,把查询的字段写出来亦可

posted @ 2014-01-28 16:02  武二郎  阅读(445)  评论(0编辑  收藏  举报