mysql同時查兩個表?
你是要干什么呢?
要把2個表關聯起來查詢?
select tbl1.mid,tbl1.tim,tbl2.mid,tb2.tim
from tbl1,tbl2
where tbl1.mid = tbl2.mid
and tbl1.mid = 9
order by tbl1.tim
還是要把2個表的查詢結果放到一起?
select mid,tim from tbl1 where mid = 9
union
select mid,tim from tbl2 where mid = 9
order by tim