11 ms·
The only real beef I have with SQL is that some of the aspects of the ordering seem weird. Why does SELECT put the column list at the start instead of the end?
by ufmace 10y ago
The only real beef I have with SQL is that some of the aspects of the ordering seem weird.
Why does SELECT put the column list at the start instead of the end? For all but the simplest queries, I want to set up my tables and joins and group bys and whatnot and then think about what columns I want from them. Seems kinda cumbersome to start with SELECT * FROM ... and then go back and fill in the columns later.
Why does UPDATE put the SET before the WHERE? Feels like an accident waiting to happen. I got into the habit long ago of writing SET x = x WHERE..., writing the correct WHERE statement, then going back and writing correct/valid sets, just to make sure I don't accidentally execute the query too soon and update the whole table.