Home Page for the TeradataForum

Archives of the TeradataForum

Message Posted: Tue, 05 Mar 2002 @ 14:52:40 GMT

  <Prev Next>   <<First <Prev

Subj:   Re: On ALTER TABLE
From:   Mary M. Conley

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.

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