Let me show my idea of SQL improvement, that I would like to see. Traditional insert works like that:
insert into table_aWhat I would like to have is something like that:
(column_1, column_2, column_3, column_4)
(value_1, value_2, value_3, value_4);
insert into table_aWith this syntax code would be easier to maintain. Especially, when you have to add or delete, or find error in insert to table with many columns. Biggest advantage of this would be close relationship between column name and value that will be set for that column. In INSERT that we know it column name and value are quite far from each other, so even for table with 10 columns it might be hard to find corresponding entries.
set column_1 = value_1
,column_2 = value_2
,column_3 = value_3
,column_4 = value_4;
In PL/SQL there is an workaround to get similar solution:
declareBut it's PL/SQL not pure SQL. I really would like to have this syntax in next Oracle release...
v_row.column_1 := value_1;
v_row.column_2 := value_2;
v_row.column_3 := value_3;
v_row.column_4 := value_4;
insert into table_a values v_row;