>>>>> "Michael" == Michael Farr <farrm@stripped>
> writes:
Michael> The only difference in the last two queries is the ISNULL(p.patientId) =>
> ISNULL(d.patientId)
mysql> SELECT p.patientId FROM Patient p LEFT JOIN DentalScheme d ON p.patientId =
> d.patientId ;
Michael> +-----------+
Michael> | patientId |
Michael> +-----------+
Michael> | 1 |
Michael> | 2 |
Michael> | 3 |
Michael> | 4 |
Michael> +-----------+
Michael> 4 rows in set (0.00 sec)
Michael> I didn't think p.patientId should be NULL here
mysql> SELECT p.patientId FROM Patient p LEFT JOIN DentalScheme d ON p.patientId =
> d.patientId WHERE ISNULL(p.patientId) ;
Michael> +-----------+
Michael> | patientId |
Michael> +-----------+
Michael> | 4 |
Michael> +-----------+
Michael> 1 row in set (0.00 sec)
mysql> SELECT p.patientId FROM Patient p LEFT JOIN DentalScheme d ON p.patientId =
> d.patientId WHERE ISNULL(d.patientId) ;
Michael> +-----------+
Michael> | patientId |
Michael> +-----------+
Michael> | 4 |
Michael> +-----------+
Michael> 1 row in set (0.00 sec)
Hi!
What is your MySQL version ? (Please repost with mysqlbug).
Can you do a full test case of this that we can test?
Regards,
Monty