Skip to content
Advertisement

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?

Advertisement

Answer

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

ALTER TABLE table ADD COLUMN colname ... BEFORE othercolumn

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement