It is not for the first time that on different forums I come across the problem of inserting new column into the definite position of the available table, say, between the first and the second column. This problem, naive as it may be in terms of relational model, is not altogether absurd nevertheless in terms of SQL language.
I call it "naive", because by definition the attributes of a relation are not arranged and the values of the attributes are processed according to their name but not to their position. As for SQL language, the columns of the table are ordered and their order is stipulated in CREATE TABLE statement. As for the new column, which is added using the ALTER TABLE statement, it is the last in the table. I.e. SQL language does not presuppose the option to add the column into a certain position in the list of columns.



Add your comment