这是外连接啊,代表如下
SQL> create table test1(mm varchar2(12),dd varchar2(10));Table createdSQL> create table test2(mm varchar2(12),yy varchar2(10));Table createdSQL> insert into test1 values('123','456');1 row insertedSQL> insert into test1 values('222','123');1 row insertedSQL> insert into test2 values('123','789');1 row insertedSQL> commit
2 /Commit completeSQL> 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 789
SQL> create table test1(mm varchar2(12),dd varchar2(10));Table createdSQL> create table test2(mm varchar2(12),yy varchar2(10));Table createdSQL> insert into test1 values('123','456');1 row insertedSQL> insert into test1 values('222','123');1 row insertedSQL> insert into test2 values('123','789');1 row insertedSQL> commit
2 /Commit completeSQL> 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 789
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货