0

I am trying to expand a column from SMALLINT to BIGINT. I get the error: SQL0104N An unexpected token "BIGINT" was found following ""TYPE SET DATA TYPE". Expected tokens may include:"". SQLSTATE=42601

1 Answer 1

0

On the DB2 reference for Alter Table you can only alter string (VARCHAR) related data types.

The alternative is to add a new column TEMP of type BIGINT, copy the value from column A to column TEMP, rename A to OLD, rename the TEMP to A, and finally drop OLD.

1
  • This suggested solution won't work on DB2 8.2 either, because you can't use ALTER TABLE to drop a column. You have to drop and recreate the table. (Or create a second copy of the table and rename the tables). Jan 7, 2011 at 1:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .