Analytics


Google

Saturday, May 2, 2009

Oracle Joins comparison

In version 9i, Oracle introduced a different way to join tables which are more consistent with other RDBMS databases.

The following statement will return the same results:


SELECT l.lotNum,
s.region ,
l.currentstep
FROM stepmaster s,
lotmastertab l
WHERE s.region > 'W'
AND l.currentstep (+) = s.step
AND l.lotNum (+) = 'ABC111';

SELECT lotNum,
s.region ,
s.step,
currentstep
FROM lla_stepeq s left outer join
lotmastertab l on step = currentstep
AND lotNum = 'ABC111'
AND s.region > 'W';

No comments: