3 ms·
"SELECT whatever FROM thisplace" is trivial to improve and could be for example thisplace[whatever]. With joins it gets more complex but still SQL could allow
by Sankozi 5y ago
"SELECT whatever FROM thisplace" is trivial to improve and could be for example thisplace[whatever].
With joins it gets more complex but still SQL could allow using foreign keys and having SELECT at the end. You could get at least something like:
"FROM Invoice i JOIN i.customer c SELECT c.name, i.number"
instead of
"SELECT c.name, i.number
FROM Invoice i
JOIN i.customer c ON i.CustomerId = c.CustomerId"
- gadders 5y agoIsn't a "WHERE" clause more intuitive than that? SELECT c.name, i.number FROM Invoice i, Customer c where i.CustomerId=c.CustomerID"
- tomnipotent 5y agoI prefer JOIN clauses because it makes it easier to reason about the underlying implementation (hash/sort-merge joins) than thinking about cartesian products. It's also much harder to screw up the ON predicate and actually cause a cross join.