5 ms·
Really would like "select * except ..." and a non-dynamic-sql way to remap column names
by x-shadowban 4y ago
Really would like "select * except ..." and a non-dynamic-sql way to remap column names
- spullara 4y agoExcept in ad hoc queries you shouldn't be using * at all so it isn't really an interesting problem to solve.
- mr_toad 4y agoThat SQL has * as the only abstraction for column names is quite frustrating. I can think of so many other ways of dereferencing column names, from using a map/or lookup table to using types. For example, selecting the unique id of a table regardless of what its name is.
- spullara 4y agoSomething like that seems reasonable until you realize that the unique id of a table could be a composite key and then things get complicated.