可能重複:
Explicit vs implicit SQL joins
In MySQL queries, why use join instead of where?有什麼區別與加入關鍵字加入或加入=
查詢與=運算符: -
Select us.FirstName
,uf.FileTitle
,pq.Question
,pa.Answer from
UserMst us,UploadedFile uf,PollQuestion pq,PollAnswer pa,PollResult pr
where us.UserId = pr.U_id
and uf.FileId=pr.A_id
and pq.Q_id=pr.Q_id
and pa.A_id=pr.ans_id
查詢加入關鍵字: -
Select us.FirstName,uf.FileTitle ,pq.Question,pa.Answer from
PollResult pr join UserMst us on us.UserId = pr.U_id
join UploadedFile uf on uf.FileId = pr.A_id
join PollQuestion pq on pq.Q_id= pr.Q_id
join PollAnswer pa on pa.A_id =pr.ans_id
哪一個執行更好?
或[INNER JOIN ON vs WHERE子句](http://stackoverflow.com/questions/1018822/inner-join-on-vs-where-clause) – bhamby 2012-04-04 14:14:46
隱式連接區域SQL反模式請參閱:http: //www.amazon.com/gp/product/1934356557/ref=kinw_rke_tl_1 – HLGEM 2012-04-04 15:42:22