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

求一个左外连接查询语句!实在搞不定语法了
select   mainContract.*,ContractKind.name   from   mainContract,ContractKind   where   mainContract.belong=ContractKind.ID   left   outer   join   node   on   mainContract.step=node.step

思路就是这样,不过查询分析器一直报错,改过去改过来也不对,请各位大哥大姐指教一下,谢谢!

------解决方案--------------------
select mainContract.*,ContractKind.name
from mainContract,ContractKind
left outer join node on mainContract.step=node.step
where mainContract.belong=ContractKind.ID

------解决方案--------------------
select mainContract.*,ContractKind.name from mainContract join ContractKind on mainContract.belong=ContractKind.ID left outer join node on mainContract.step=node.step