Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 05 Jan 2011 @ 10:40:00 GMT


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


Subj:   Re: Alter the column without dropping the table and column
 
From:   Anshuman.Singh

Its not possible without dropping the column , take a backup of the table then drop the column then recreate it . as per syntax

     CREATE SET TABLE EDW.tab1 ,NO FALLBACK ,
          NO BEFORE JOURNAL,
          NO AFTER JOURNAL,
          CHECKSUM = DEFAULT
          (
           col1 VARCHAR(1) ,
           col2 DECIMAL(9,2)
              )
     PRIMARY INDEX ( col1);

     ALTER TABLE EDW.tab1
       DROP col1

     ALTER TABLE EDW.tab1
       ADD  col2  DECIMAL(15,2)

Moreover you should not have duplicate values decimal column( that has to be dropped ) otherwise the column wont be dropped .

Regards,

Anshuman Singh
Associate Projects



     
  <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