Skip to main content
3 events
when toggle format what by license comment
Feb 4, 2014 at 10:49 comment added Colin 't Hart Right, but then you could either a) add COALESCE/NVL and return 0; b) filter out employees without payments with an ordinary JOIN to payments; or c) just add WHERE EXISTS (SELECT 1 FROM PAYMENTS WHERE EMPID = EMP.EMPID).
Feb 4, 2014 at 10:44 comment added Mikayil Abdullayev The problem with your variant is it returns even those rows where only Employees table has rows and the Payments table has no corresponding row.
Feb 4, 2014 at 10:27 history answered Colin 't Hart CC BY-SA 3.0