MIDRANGE dot COM Mailing List Archive



Home » MIDRANGE-L » November 2012

V7R1 DB2 for IBMi; ALTER Table cc ADD COLUMN xx FOR COLUMN yy



fixed

We have been on V7R1 for a week now, having upgraded from V5R4M5.

Issued this SQL command:
ALTER TABLE F55JOBS
ADD COLUMN COUNTRY FOR COLUMN WJCTR
CHAR ( 3)
NOT NULL WITH DEFAULT ' '


In SQL both of these statements return data:

This works: SELECT WJCTR FROM F55jobs

And this works: SELECT country FROM F55jobs

Is this new functionality?
+++++++++++++
The IBM help text for the field COUNTRY says:

Type the column (field) names of the table (file). Do not
use the same name for more than one column of the table
(file) or the system column name of the table (file). You
can define up to 8000 columns.

The IBM help text for WJJCTR says:
Type the FOR column (field) name for the column (field).
This name is optional. If the column (field) name is more
than 10 characters long and the FOR column (field) name is
not specified, one will be generated when the table is
created.

The FOR column (field) name may also be referred to as the
system column (field) name.





Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2014 by MIDRANGE dot 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 here. If you have questions about this, please contact