db2 modify column type

xiaoxiao2026-03-14  11

DB2 is so hard to use, also its documentation... Even such a simple operation, it takes me much time...   Generally, char->varchar, smallint->integer, you can just modify the column through this sql: alter table [table name] alter column [column name] set data type [new type]   But, if new column type is not compatible with existing column type, you need to modify it as follows:   1. maybe need to export old column data 2. drop the column: alter table [table name] drop column [column name] 3. add new column: alter table [table name] add column [column name] [column type] 4. reorg table [table name] 5. maybe need to import original data 相关资源:敏捷开发V1.0.pptx
转载请注明原文地址: https://www.6miu.com/read-5045900.html

最新回复(0)