3 ms·
SQL does seem antiquated, I know a lot of people who have worked with it for ages are in the 'don't fix if it ain't broken' camp but consider even completely ba
by temp_account_32 4y ago
SQL does seem antiquated, I know a lot of people who have worked with it for ages are in the 'don't fix if it ain't broken' camp but consider even completely basic things that you cannot do, such as get autocomplete for what you want to select.
Because you are forced to specify what you want to SELECT before the FROM, you are left guessing the column names.
In contrast, in a programming language or ORM, you'd do something like (pseudocode) Entity.Select( ... ) and can get suggestions of the fields, but with SQL you are forced to do it backwards.
- worthless-trash 4y ago> such as get autocomplete for what you want to select. By "autocomplete" do you mean like column/table names ?
- temp_account_32 4y agoYeah, column names. For me, it would make much more sense to start the statement with FROM instead of SELECT, to let whatever client you're using know which table you're selecting from, and then it can help you select the columns. Hope I explained this well enough.
- worthless-trash 4y agoI'm wondering how this could be done in an editor. I guess if you could pump it into a LSP, maybe it could have knowledge of the tables/views/etc database internals.. Some people put these inside strings though.. Like this: https://www.w3schools.com/php/php_mysql_select.asp https://www.w3schools.com/php/php_mysql_select.asp (good practice arguments aside), Its a non trivial problem to solve across all languages.