Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 16 Aug 2004 @ 09:42:27 GMT


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


Subj:   How to alter the columns in tables?
 
From:   Anomy Anom

<-- Anonymously Posted: Monday, August 16, 2004 04:13 -->

Hi All,

In Teradata, how can I do following things -

1) How can I increase the length of the column with datatype CHAR, INTEGER or FLOAT? The ADD command works only for the VARCHAR datatype & not for others. Is there any straightway SQL for this?

2) How can I add a not null column to a table already having data? If I specify the default value, can I take it off later on? like If say - alter table xyz ADD COL1 VARCHAR(40) NOT NULL default 'xx';


Once my table is altered with 'xx' values in the new column for all the existing records. How can I remove this default constraint for the New record Inserts? So that, next time if any record is being Inserted with no data in this column, it throws error instead of simply inserting the record with 'xx' value in it.


Thanks & Regards



     
  <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: 27 Dec 2016