Hacker News new | ask | show | jobs
by masklinn 1433 days ago
You’d most likely solve this by making the CarID NOT NULL because there’s why would you even have a row with no useful data?

And if this is your employee table, you’d have UNIQUE (EmployeeData) and UNIQUE (CarID), and it would do what you want.