敬业的IT人 >> 数据库 >> SQLServer >> ORacle Outer Join usage.外连接使用

ORacle Outer Join usage.外连接使用

敬业的IT人 互联网 佚名 2008-2-27 23:35:14

今天试了一下outer join,还可以,下面是我的一个三个表的连接查询,看是否有数据

select t1.jh,t1.ch,t1.djsd1,t1.djsd2,t1.cjjsjg,t2.jh,t2.ch,t2.djsd1,t2.cjjsjg,t3.xh,t3.xds1,t3.jsjg
from logdb.f002 t1,logdb.l016 t2,logdb.l015 t3
where  t1.jh='查询' and t1.jh=t2.jh(+) and t1.ch=t2.ch(+)
and t1.jh=t3.jh(+) and (t3.xds2(+) between t1.djsd1 and t1.djsd2) order by 3其中连接操作符(+),他在哪一边,则使另一边的表的落空记录显示,也就是另一边可能多显示。还发现between也可以加这个符号.

粤ICP备06119539号
Copyright CiscoSky.Org,Some Rights Reserved.
Email:me1228#tom.com