3 ms·
Is this not something that should be written at the app level rather than dml?
by Guest42 5y ago
Is this not something that should be written at the app level rather than dml?
- Tostino 5y agoForeign keys in general? I am not sure I understand what you mean...
- Guest42 5y agoNot something I’ve ever thought about but I think that it could be done via macro, I have written tsql functions in c# and imagine that other dialects have analogous functionality. It seems as though the point is to cut down on sql code, it’d also be possible to query the foreign keys and create a data structure that could feed a function for joins. I haven’t thought out the specifics but think this type of approach would be more practical than changing the sql standard.
- Tostino 5y agoAt that point you are just building a feature into an "ORM" of some sort. The entire point is to allow queries to be written in a more concise way for this simple equality join use case which is (total ballpark figure) ~half of the joins in my system.