Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 07 Dec 2005 @ 14:48:11 GMT


     
  <Prev Next>   <<First <Prev Next> Last>>  


Subj:   Re: ALTER table to change column width
 
From:   Dempsey, Mike

If the table contains data you probably need to:

a) add a new column of the required size (must be Nullable)

b) update/set the new column with data from the old

c) drop the old column

d) rename the new column to match the old

e) [optional] use ADD to add the 'Not Null' attribute


This will not work if the column is part of the primary index.

Your alternative is to create a new table and insert select from the old to the new, then rename it.


Mike Dempsey
Teradata Client Tools



     
  <Prev Next>   <<First <Prev Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023