15.00 - Character Data Types - Teradata Database

Teradata Database Design

prodname
Teradata Database
vrm_release
15.00
category
User Guide
featnum
B035-1094-015K

Character Data Types

 

CHARACTER(n): 1 - 64,000 Bytes Fixed (All Platforms)

   Byte 1

    Byte 64,000

1  —  64,000

 

VARCHAR(n): 1 - 64 000 Bytes Variable (All Platforms)

      Byte 1

      Byte 2

   Byte 64,000

Column offset

1  —  64,000

 

LONG VARCHAR: 1 - 64,000 Bytes Fixed (equivalent to VARCHAR(64000) (All Platforms)

      Byte 1

      Byte 2

   Byte 64,000

Column offset

1  —  64,000

 

CLOB(n): 8 bytes - 2 097 088 000 bytes Variable (All Platforms)

     Chunk

  Bytes 1 - 8

   Byte 64,000

1

length

1 — 64,000

length

1 — 64,000

m

length

1 — n

If a CLOB is composed of Unicode characters, its upper limit is 1,048,544,000 bytes.

In both cases, the maximum supported size is slightly less than 2 GB or 1 GB, respectively.

 

CHARACTER(n) CHARACTER SET GRAPHIC : 1 - 32,000 Bytes Fixed (All Platforms)

     Byte 1

    Byte 32,000

1  —  32,000

 

VARCHAR(n) CHARACTER SET GRAPHIC: 1 - 32,000 Bytes Variable (All Platforms)

     Byte 1

     Byte 2

    Byte 32,000

Column Offset

1  —  32,000

 

LONG VARCHAR CHARACTER SET GRAPHIC: 32,000 Bytes Fixed (equivalent to VARCHAR(n) CHARACTER SET GRAPHIC (32000) (All Platforms)

     Byte 1

     Byte 2

    Byte 32,000

Column Offset

1  —  32,000

The following table indicates the alignment requirements for the character data types and their respective sizes on packed64 and aligned row format platforms.

 

                                  Data Type

 

  Packed64  Size

        (bytes)

     Aligned Row
       Size (bytes)

        Allocated            Aligned Row
      Size (bytes)

CHARACTER(n) CHARACTER SET LATIN

          n

          1

             n

CHARACTER(n) CHARACTER SET KANJI

CHARACTER(n) CHARACTER SET UNICODE

        2n

          2

           2n

CHARACTER(n) CHARACTER SET GRAPHIC

VARCHAR(n) CHARACTER SET LATIN

          n

          1

             n

VARCHAR(n) CHARACTER SET UNICODE

      2n

          1

     ≤   2n

VARCHAR(n) CHARACTER SET GRAPHIC

VARCHAR(n) CHARACTER SET KANJI

        n

          1

            n

LONG VARCHAR CHARACTER SET LATIN

        64,000

 

          1

 

 

 

 

        64,000

 

LONG VARCHAR CHARACTER SET KANJI1

LONG VARCHAR CHARACTER SET UNICODE

        32,000

 

 

    32,000

 

 

LONG VARCHAR CHARACTER SET GRAPHIC

LONG VARCHAR CHARACTER SET KANJISJIS

CLOB(n) CHARACTER SET LATIN

          n

          1

             n

CLOB(n) CHARACTER SET UNICODE

      2n

          2

   ≤  ≤   2n