Inserting new columns in the middle of a table?

后端 未结 6 499
陌清茗
陌清茗 2020-12-20 14:29

When one uses \"ALTER TABLE tab ADD col\", the new column gets added to the end of the table. For example:

TABLE: TAB
COL_1 COL_2 COL_4

ALTER TABLE TAB ADD          


        
6条回答
  •  萌比男神i
    2020-12-20 14:55

    As per my small research the only way is to create the views of the previous table in a required order of columns or else recreate the table from the scratch and in some sql query tools the 'AFTER' keyword might work".

提交回复
热议问题