Home Page for the TeradataForum
 
 

 

Archives of the TeradataForum





Message Posted: Thu, 17 May 2001 @ 18:43:47 GMT





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




Subj:   Re: Defaults for Date and Time columns
 
From:   Russ Huntley



If you are trying to do this as an afterthought to a large table, and you want to avoid having every row in the table updated, you can first add the column with a default of null, and then alter the column to a default of date.

Alter table xxx
add Inserted_Date Date Default null

and then...

Alter table xxx
add Inserted_Date Default Date format 'YYYY-MM-DD'

The same should work for time.





     
  <Prev Next>   <<First <Prev Next> Last>>  
 
 
 
 
 
 
 
 
  
 
  Top Home Join Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky 
Last Modified: 30 Jun 2008