Quote:
Originally Posted by shore
Is it possible to decrease column length??
|
I don't know what this question has to do with the original post, but the manual (
ALTER TABLE - IBM DB2 9.7 for Linux, UNIX, and Windows) under "SET DATA TYPE altered-data-type":
Quote:
|
Altering the length of a VARCHAR or VARGRAPHIC column which does not truncate any existing data does not require a subsequent reorganization of the table. [i][b]If only trailing blanks are truncated[i][b], then a table reorganization is required before the table can be fully accessed (SQLSTATE 57016). The administrative routine SYSPROC.ADMIN_REVALIDATE_DB_OBJECTS can be called to do table reorganization as required. Truncation of non-blank characters is not allowed (SQLSTATE 42837).
|
So the answer is: it depends. You can reduce the size, but it depends on the data in the table and what kind of truncation would occur. And, of course, it depends on the DB2 version you are using and your platform whether the above quoted paragraph actually applies to you.