sqldb2ibm-midrangedb2-400

Add a column to a DB2/400 table with a specific ordinal position


Is there an SQL command on the AS400/iSeries/System-i/whatever to add a column to a table in a specific ordinal position, or moving an existing column to a different position?


Solution

  • As of IBM i 7.1 allows you to add a column in front of another.

    ALTER TABLE table ADD COLUMN colname ... BEFORE othercolumn