Archives of the TeradataForum
Message Posted: Thu, 27 Aug 2015 @ 19:16:19 GMT
<-- 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 -
MyColumn CHAR(n) FOR SBCS DATA WITH DEFAULT;
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 ?
|Copyright 2016 - All Rights Reserved|
|Last Modified: 28 Jun 2020|