日期:2014-05-19  浏览次数:20542 次

3个表join怎么办
3个表join怎么办

------解决方案--------------------
修改一個地方就可以了。

select prjcourse.prjid AS 项目ID,prjinfo.prjname AS 项目名,prjcourse.phaseid AS 阶段ID,prjphase.phasename AS 阶段名

from prjcourse
inner JOIN prjinfo
on prjinfo.prjid=prjcourse.prjid
inner join prjphase
on prjphase.phaseid=prjcourse.phaseid and prjphase.prjid=prjcourse.prjid