neděle 7. června 2015

What is wrong with SQL

There are several things I wish were different in SQL:
  1. When you want to select whole table, just without one column, how do approach it in (pure) SQL? You have to write the names of all the columns that you want to keep. If you have a table with 1000 columns, you have to name 999 columns. In other languages, like R (with negative index) or SAS (with drop command), you would just name that single column that you don't want to preserve. SQL should have the same functionality.
  2. Intelligent code completion in SQL simply doesn't work very well. First you have to select the names of the columns you want to keep (out of thousands of columns in the schema) and then you have to name the source tables (out of tens of tables in the schema). If the order was just reversed, intelligent code completion would work like a charm - select table names out of tens of tables and then select column names from the list of columns present in the selected columns. In LINQ the correct order was used.