ALTER Table in Teradata

One interesting thing I have noticed in Teradata. I have an existing table, I want to ADD one new column to it.

I have given below query. I am getting an error.

Resolution for Varchar


Error Query:
       
ALTER TABLE SAMPLES.LOAN_ACCOUNT
ADD MY_NEW VARCHAR2(1);
       

Error: 3706: Syntax error VARCHAR2 does not match defined type.


Correct Query:
       
ALTER TABLE SAMPLES.LOAN_ACCOUNT
ADD MY_NEW1 VARCHAR(1);
       


Comparison Oracle Vs DB2

Teradata ODBC Driver Type  Native type for Oracle 9i or 10g staging data source Data type for Oracle 9i or 10g staging data source Native type for DB2 staging data source Data type for DB2 staging data source
BYTEINT integer NUMBER(38) integer VARCHAR(3)
SMALLINT integer INTEGER integer INTEGER
INTEGER Integer INTEGER Integer INTEGER

Comments

Popular posts from this blog

3 Uses of SAMPLE function in Teradata