Skip to main content

### ALTER Table in Teradata

- Get link
- Facebook
- Twitter
- Pinterest

January 29, 2015
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

- Get link
- Facebook
- Twitter
- Pinterest

### Comments

### Popular posts from this blog

### SQL for Quantile Function in Teradata

February 19, 2015
A Quantile is used to divide rows into a number of categories or grouping of roughly the same number of rows in each group. Quantile Function The percentile is the QUANTILE most commonly used in business.
Read more

### 3 Uses of SAMPLE function in Teradata

July 19, 2015
Usage-1 It returns a rows randomly from Teradata database. Syntax for SAMPLE function: SAMPLE [WITH REPLACEMENT] [RANDOMIZED ALLOCATION] [WHEN <condition> THEN] {<number-of-rows> | <percentage>} […,<number-of-rows> | <percentage>] [ELSE {<number-of-rows> | <percentage } END] Usage 2 It allows the user to get absolute number of rows or percentage of rows.
Read more

### All You Need NULL Value Functions

September 25, 2016
The below are the Null value functions in Tearadata. One is "NVL" and another one is "NVL2".
Read more