Archives of the TeradataForum
Message Posted: Tue, 05 Mar 2002 @ 14:52:40 GMT
Whether the Alter returns an error depends on whether you are changing the data type and if the change is permitted. Look at the Alter command in the SQL manual and you will find a section 'Rules for Changing a Data Type'.
Create table t1(a int,b int);
In this situation: alter table t1 add a int;
This data type change (though not really a change) is permitted, thus it is not an error.
In this situation: alter table t1 add a char(1);
You are changing the data type so it is not permitted and thus an error is returned.
From my experiences, you can change numeric data types (integer, decimal, smallint, etc) to another numeric data type, you cannot change the lengths of char fields, and you cannot change from char to numeric, or vice-versa.
|Copyright 2016 - All Rights Reserved|
|Last Modified: 28 Jun 2020|