在查询的时候使用别名
select a.id,b.id from table1 as a,table2 as b
你就可以分别知道哪个字段来自于哪一个表了