查询的时候加个东西就好了
比如3个表连接,表名分别叫a,b,c
select 'a' tbname,a.* from aunion allselect 'b' tbname,b.* from bunion allselect 'c' tbname,c.* from c
最后查出来,tbname那个就代表从哪个表出来的数据
查出来的字段与表里的字段能对应上的就是属于该表