var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Altering a column ...
Hi, Any problem wit hthe syntax below:
ALTER TABLE WSI.DATAFEED ALTER COLUMN CAT_ID SET GENERATED AS IDENTITY (START WITH 1000 INCREMENT BY 1 CACHE 5)
Does the table have to be in check pending before alter statement is run?
The syntax look OK. This should alter the column to always generate the identity value on insert. Make sure this is what you want/need. I do not think the table needs to be in a check pending state.
This keeps throwing messages.
DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL0104N An unexpected token "GENERATED AS IDENTITY (START WITH 1000" was
found following "ER COLUMN CAT_ID SET". Expected tokens may include:
What DB2 version and OS?
Its DB2 8.1 fix12 on AIX 5.2 fix6
I do not know what the problem is. I just ran the following successfully:
ALTER TABLE ANDY.CITIES ALTER COLUMN CODE SET GENERATED AS IDENTITY ( START WITH 0 INCREMENT BY 1 NO CACHE ) ;
Thanks for checking. I'll try another server. What db2 level are u at? Is it AIX?
Thanks. It works. My mistake. A typo.