Re:Joins In Steps
by gav on Saturday May 11, 2019 @05:04AM
(#19885306)
I struggle to think of time I used a right join in the 20-odd years I've used SQL.
The example shows a case where you'd want foreign keys to enforce referential integrity, though FKs aren't fashionable these days. You shouldn't be able to have an entry for owner_id 8 in the Dogs table without a corresponding Owner.
The example shows a case where you'd want foreign keys to enforce referential integrity, though FKs aren't fashionable these days. You shouldn't be able to have an entry for owner_id 8 in the Dogs table without a corresponding Owner.