BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bi
PL/SQL Release 10.2.0.3.0 - Production
CORE 10.2.0.3.0 Production
TNS for HPUX: Version 10.2.0.3.0 - Production
NLSRTL Version 10.2.0.3.0 - Production
SQL> select * from karl.tmp_a;
ID
----------
1
2
SQL> select * from karl.tmp_b;
ID NAME SEX
---------- ---------- ----------
1 karl
karlx
1
--SQL1:这是我期望得到的两条结果
SQL> select a.id,b.* from tmp_a a left join tmp_b b on a.id = b.id and b.name = 'karl';
ID ID NAME SEX
---------- ---------- ---------- ----------
1 1 karl
2
Execution Plan
----------------------------------------------------------
Plan hash value: 3207854926