On 29-Mar-2012 10:30 , Jerry C. Adams wrote:
I suppose, first, a CRTDUPOBJ and then an Alter Table, such as:
ALTER TABLE LISTCONS
ADD ABNSTK CHAR(1) CCSID 37 NOT NULL WITH DEFAULT ;
LABEL ON <<SNIP>>
This adds the field at the end; personally, I rarely use Alter Table
so I don't know if one could actually insert a field (column) at
another relative location.
CHGPF SRCFILE(specified) had allowed change in ordinal position of
With IBM i v7r1 SQL there is a BEFORE column-name [sub]clause to
effect similar, but only for the ADD COLUMN clause:
IBM i 7.1 Information Center -> Database -> Reference -> SQL reference
_i ALTER TABLE i_
"The ALTER TABLE statement alters the definition of a table.
_i BEFORE column-nameEnd of change i_
Identifies the column before which the new column is added. The
name must not be qualified and must identify an existing column in the
table. If the BEFORE clause is not specified, the column is added at the
end of the row.
This mailing list archive is Copyright 1997-2020 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact