A have a db2 table with a column col1 varchar(2000). I want to reduce length from 2000 to 1600 byte. It is possible to do this with ALTER? Or in this case, the only valid solution is DROP - CREATE?
ALTER COLUMN col1 SET DATA TYPE VARCHAR(1600) -- doesn't work for reduce size, just for increase
Thanks for any idea!!!
For Db2-for-Z/OS at v11 or V12 the rules for
ALTER TABLE...ALTER COLUMN ...SET DATA TYPE ...
include this rule:You have not explained the motivation for reducing the column length, maybe double check this, and what assumptions you are making as they might not be true.