4 ms·
Why are you joining on a nullable column in the first place? If your database is well designed, joining on a nullable column should be a relatively exotic use
by rrrrrrrrrrrryan 4y ago
Why are you joining on a nullable column in the first place?
If your database is well designed, joining on a nullable column should be a relatively exotic use case, and can be handled by writing a tiny bit more code to check for NULLs before performing your join.
- crazygringo 4y agoIt's not. Assume y.a is the non-nullable primary key, while y.b is the column that may be null. But in this example there might not be a row where y.a = 5. Or there might be. But you can't tell.
- tremon 4y agoBut in those cases, you can always tell by including the non-nullable key in your result set. It's already being evaluated, so it's virtually free (only adds to the network transport size).