3 ms·
I would love to create another dialect of SQL where you could do: 1. FROM, 2. WHERE, 3. SELECT Instead of 1. SELECT, 2. FROM, 3. WHERE
by 29athrowaway 5y ago
I would love to create another dialect of SQL where you could do:
1. FROM, 2. WHERE, 3. SELECT
Instead of
1. SELECT, 2. FROM, 3. WHERE
- handrous 5y agoLeading with a description of what you'll "return" makes some sense, especially when you're chaining, nesting, or otherwise combining queries. I agree that it's kinda weird, though. Every time I need to spend serious time in SQL I end up having to re-learn how to think "inside out", for that and other reasons.
- 29athrowaway 5y agoFrom a parsing perspective, you can use the first keyword to branch to the proper parsing expression with ease... e.g.: If the query starts with "SELECT" I can use the SELECT parser. If it starts with "UPDATE" I can use the UPDATE parser and so on. With FROM/WHERE/SELECT you can no longer do that. So there's a cost... but to be honest, it's worth it in my opinion.
- hnrodey 5y agoThis is the exact format of LINQ statements in C#. Having the `select` later in the statement would be a productivity gain so that intellisense could be accurate the first time writing.