DB2 how to update existing column length

Its simple, just use ALTER COLUMN with SET DATA TYPE
ALTER TABLE $table_name                    
ALTER COLUMN $column_name                
SET DATA TYPE DECIMAL(15, 5)  
ALTER TABLE $table_name                    
ALTER COLUMN $column_name                
SET DATA TYPE VARCHAR(30) 

No comments:

Post a Comment

NO JUNK, Please try to keep this clean and related to the topic at hand.
Comments are for users to ask questions, collaborate or improve on existing.