Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question
up vote 0 down vote accepted

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.

share|improve this answer
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). – Ian Bjorhovde Jan 7 '11 at 1:08

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.