---当使用(+)操作符执行外连接时,如果在where子句中包含有多个条件,则必须在所有条件中都包含(+)操作符
SQL> SELECT COUNT(*)2 FROM WCS_CUSTOMER_FAVORITE_TASKS WC, LABAC_TASKS LT
3 WHERE (LT.TASK_ID(+) = WC.TASK_ID AND LT.TASK_END_TIME(+) IS NULL);
COUNT(*)
----------
10
SQL> SELECT COUNT(*)
2 FROM WCS_CUSTOMER_FAVORITE_TASKS WC, LABAC_TASKS LT
3 WHERE (LT.TASK_ID(+) = WC.TASK_ID AND LT.TASK_END_TIME IS NULL);
COUNT(*)
----------
7
--oracle使用全连接
SELECT COUNT(*)FROM WCS_CUSTOMER_FAVORITE_TASKS WC
FULL OUTER JOIN LABAC_TASKS LT
ON WC.TASK_ID = LT.TASK_ID
AND LT.TASK_END_TIME IS NULL;