|
|
|
|
|
by ikawe
4797 days ago
|
|
You're right in that they are largely the same action, but consider this case: An Owner is deleted without setting the pets.owner_id to NULL. So now there's a row in Pets with an owner_id referring to an Owner that doesn't exist. These two queries will (rightfully) return different things in this case. One will return The Pets who have null for an owner_id.
The other will return the Pets whose owner_id is NULL AND those who do have an owner_id, but it doesn't reference an existing row in Owner. |
|