不对!
select stinms, cyoumei.cyounm, cyomen, gaikun, jyuukn, syugsti.goutou, syugsti.heyabg
from jyuukyo inner join cyoumei on (jyuukyo.kencod=cyoumei.kencod and jyuukyo.sicode = cyoumei.sicode and jyuukyo.cyoucd = cyoumei.cyoucd) left join syugsti on jyuukyo.hkcode = syugsti.hkcode
where jyuukyo.tuuhac = a and
jyuukyo.kbnkon = b and
jyuukyo.haituj = c
select stinms, cyoumei.cyounm, cyomen, gaikun, jyuukn, syugsti.goutou, syugsti.heyabg
from jyuukyo inner join cyoumei on (jyuukyo.kencod=cyoumei.kencod and jyuukyo.sicode = cyoumei.sicode and jyuukyo.cyoucd = cyoumei.cyoucd) left join syugsti on jyuukyo.hkcode = syugsti.hkcode
where jyuukyo.tuuhac = a and
jyuukyo.kbnkon = b and
jyuukyo.haituj = c
Do you know whether SQLServer can accept the oracle (+)?
(旧)FROM samari a,kikaika b
WHERE a.hpofno = b.poofno(+)
(新)FROM samari a RIGHT JOIN kikaika b ON a.hpofno = b.poofno;而三个的就变了呢?请执教.
select stinms, cyoumei.cyounm, cyomen, gaikun, jyuukn, syugsti.goutou, syugsti.heyabg
from jyuukyo,cyoumei,syugsti
where jyuukyo.tuuhac = a
and jyuukyo.kbnkon = b
and jyuukyo.haituj = c
AND jyuukyo.kencod = cyoumei.kencod //
and jyuukyo.sicode = cyoumei.sicode //
and jyuukyo.cyoucd = cyoumei.cyoucd //
and jyuukyo.hkcode = syugsti.hkcode; //这样已经达到了三个表连接起来了。