日期:2014-05-17  浏览次数:20610 次

请教一个左连接问题
SELECT *
FROM table1 t1 LEFT OUTER JOIN table2 t2
  ON t1.a = t2.c
ORDER BY t1.a

如果t1.a,t2.c都是null,怎么关联起来?


------解决方案--------------------
JUST TRY IT ..
SQL code
SELECT *
  FROM TABLE1 T1
  LEFT OUTER JOIN TABLE2 T2 ON NVL(T1.A, 0) = NVL(T2.C, 0)
 ORDER BY T1.A;