How to insert columns at a specific position in existing table?

前端 未结 8 2091
野趣味
野趣味 2020-12-25 09:54

I created a table with 85 columns but I missed one column. The missed column should be the 57th one. I don\'t want to drop that table and create it again. I\'m looking to ed

8条回答
  •  一整个雨季
    2020-12-25 10:25

    As workaround one could consider the use of column renaming. I.e. add the new column at the end, and then until the new column is at the right position, add a temporary column for each column whose position is after the new column, copy the value from the old column to the temporary one, drop the old column and finally rename the temporary column.

    see also: https://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:1770086700346491686

提交回复
热议问题