语句一:
select a.ich_dadate,
b.ws_ssname,
c.pl_ssname,
d.ve_ssname,
e.icl_nqsum,
e.icl_ssunit3,
f.sk_ssname,
g.emp_ssname
from ic_trnh a,
sfm_workshop b,
bd_pline c,
bd_vehm d,
ic_trnl e,
bd_item f,
sys_emp g
where a.ws_sno = b.ws_sno
and a.pl_sno = c.pl_sno
and a.ve_sno = d.ve_sno
and a.ich_sno = e.ich_sno
and e.sk_sno = f.sk_sno
and a.ich_sinman = g.emp_sno
语句二:
select t0.ich_dadate,
t0.ich_sdef5,
t3.ws_sname,
t4.pl_sname,
t8.Wol_Ncount1,
t5.ve_sname,
t1.ICL_NQSUM,
t9.mea_ssname,
t6.sk_sname,
t7.emp_sname
from ic_trnh t0
inner join ic_trnl t1 on (t0.ich_sno = t1.ich_sno)
left join sfm_workshop t3 on (t0.ws_sno = t3.ws_sno)
left join bd_pline t4 on (t0.pl_sno = t4.pl_sno)
left join bd_vehm t5 on (t1.ve_sno = t5.ve_sno)
left join bd_item t6 on (t1.sk_sno = t6.sk_sno)
left join sys_emp t7 on (t0.ich_scman = t7.emp_sno)
left join pd_wol t8 on (t0.Who_Sno = t8.who_sno)
left join bd_measdoc t9 on (t1.icl_ssunit3 = t9.mea_sno)
上面好像是子查询,下面是连接查询。
比如要取8个字段 分别从8个表中每取一个,上面那种查询sql,和下面的查询sql,得出结果不同。
不清楚原因??求朋友解释!!