新手问题
where e.department_id(+) = d.department_id(+) 中的(+)是什么意思啊?
问题点数:30、回复次数:2Top
1 楼boy002()回复于 2003-08-04 09:14:18 得分 25
这是外连接啊,代表如下
SQL> create table test1(mm varchar2(12),dd varchar2(10));
Table created
SQL> create table test2(mm varchar2(12),yy varchar2(10));
Table created
SQL> insert into test1 values('123','456');
1 row inserted
SQL> insert into test1 values('222','123');
1 row inserted
SQL> insert into test2 values('123','789');
1 row inserted
SQL> commit
2 /
Commit complete
SQL> select * from test1 ,test2 where test1.mm=test2.mm(+);
MM DD MM YY
------------ ---------- ------------ ----------
123 456 123 789
222 123
SQL> select * from test1 ,test2 where test1.mm(+)=test2.mm;
MM DD MM YY
------------ ---------- ------------ ----------
123 456 123 789Top
2 楼beckhambobo(beckham)回复于 2003-08-04 09:14:45 得分 5
外连接,相当于left join,right joinTop




