Home Page for the TeradataForum

Archives of the TeradataForum

Message Posted: Thu, 27 Aug 2015 @ 19:16:19 GMT

  <Prev Next>  
Next> Last>>  

Subj:   DB2 to Teradata Convertion - CHAR with DEFAULT
From:   Anomy Anom

<-- Anonymously Posted: Thursday, August 27, 2015 13:58 -->


I am converting some DB2 DDLs to Teradata equivalent. For some columns in DB2 I see the following definition -


Note that just the DEFAULT specifier is mentioned and NO default value is specified.

I searched the web and found that in such cases, for a CHAR(n) field, if only the keyword "DEFAULT" is specified (without any value specified), DB2 fills up the field with "n" number of spaces automatically.

Is there any similar way to accomplish the same in Teradata without having to put in "n" number of spaces in the DEFAULT specifier in the Create statement ?

For e.g. for a field of type CHAR(15), do I have to specify 15 spaces as the default value string in the CREATE Table statement or is there any other way to accomplish the same without having to specify 15 spaces as the default string ?

     CREATE TABLE test
        ( myfield     CHAR(15)   DEFAULT '               '

Any work around possible for the above create statement without having to specify the 15 spaces as default value ?


  <Prev Next>  
Next> Last>>  
  Top Home Privacy Feedback  
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 24 Jul 2020