mysql左查詢右查詢,mysql同時查詢兩張表?
你是要干什么呢?
要把2個表關聯(lián)起來查詢?
select tbl1.mid,tbl1.tim,tbl2.mid,tb2.timfrom tbl1,tbl2where tbl1.mid = tbl2.mid and tbl1.mid = 9order by tbl1.tim 還是要把2個表的查詢結(jié)果放到一起?
select mid,tim from tbl1 where mid = 9unionselect mid,tim from tbl2 where mid = 9order by tim