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?
Agreed. If you had the DDS for the file, you could insert the field in the DDS and then use a CHGPF command. Or you could create the new table in SQL and copy the data using CPYF with FMTOPT(*MAP *DROP).
Tracy Probst
2009-10-21 13:14:59
I have a feeling you are right but I am just hoping someone knows a super secret easy and safe way to do this...
larson4
2009-10-22 21:00:12
+1
A:
IBM i 7.1 now allows you to add a column in front of another.
ALTER TABLE table ADD COLUMN colname ... BEFORE othercolumn
david
2010-06-03 13:43:29