I am trying to add a new column between 2 existing columns. Here I am using "after" clause to insert the new column. Below is my query.
alter table doc add column alt_title varchar(10) after title;
I am seeing the below error
An unexpected token "title" was found following "varchar(10) after".
Expected tokens may include: "REFERENCES".. SQLCODE=-104, SQLSTATE=42601, DRIVER=4.8.86
Elapsed Time: 0 hr, 0 min, 0 sec, 0 ms.
I even tried before clause,and get same results. Can someone please help me fix the issue?
There is no way to modify the table by adding a column in the middle, however you can recreated with the good structure.
You can get all this information by using db2look.