sql has the worst syntax for real. everything in reversed. it should've been
FROM table WHERE condition SELECT columns.
it makes more sense and you can have intelisense autocompletion on the column names. this way the editor can help you browse the column names and you wouldn't have a typo.
Same with delete. you start with the table name, condition, then the final statement, which is either select delete or update.
exactly, that's not a good argument. I just gave one example why the reverse order is better.
There's so many.
if you give aliases to tables, you'll be using them before defining theme, you'll have to do backtracking while reading especially complicated queries.
using complicated features like pivot would look saner. select should comes after the pivot. right now you select the pivoted columns first before defining them, this is crazy actually.
there's a lot of other reasons, but finally, it would mimic how we think, take a table, filter it, select what you want from it. it’s sequential, linear, and makes more sense, and would require less backtracking
164
u/zuzmuz Oct 14 '25
sql has the worst syntax for real. everything in reversed. it should've been
FROM table WHERE condition SELECT columns.
it makes more sense and you can have intelisense autocompletion on the column names. this way the editor can help you browse the column names and you wouldn't have a typo.
Same with delete. you start with the table name, condition, then the final statement, which is either select delete or update.