17.05 - データ型構文 - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQLデータ定義言語 構文規則および例

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
Release Date
2021年1月
Content Type
プログラミング リファレンス
Publication ID
B035-1144-175K-JPN
Language
日本語 (日本)

data_type

{ INTEGER | SMALLINT | BIGINT | BYTEINT | DATE |

  { TIME | TIMESTAMP } [ (fractional_seconds_precision) ] [WITH TIME ZONE] |

  INTERVAL YEAR [(precision)] [TO MONTH] |

  INTERVAL MONTH [(precision)] |

  INTERVAL DAY [(precision)] [TO { HOUR | MINUTE | SECOND [(fractional_seconds_precision)] }] |

  INTERVAL HOUR [(precision)] [TO { MINUTE | SECOND [(fractional_seconds_precision)] }] |

  INTERVAL MINUTE [(precision)] [TO SECOND [(fractional_seconds_precision)]] |

  INTERVAL SECOND [(precision) [, fractional_seconds_precision)] |

  PERIOD (DATE) |

  PERIOD ( { TIME | TIMESTAMP } [(precision)] [WITH TIME ZONE] ) |

  REAL |

  DOUBLE PRECISION |

  FLOAT [ (integer) ] |

  NUMBER [ ( { integer | *} [, integer]... ) ] |

  { DECIMAL | NUMERIC } [ ( integer [, integer]... ) ] |

  { CHAR | BYTE | GRAPHIC } [ (integer) ] |

  { VARCHAR | CHAR VARYING | VARBYTE | VARGRAPHIC } [ (integer) ] |

  LONG VARCHAR |

  LONG VARGRAPHIC |

  { BINARY LARGE OBJECT | BLOB | CHARACTER LARGE OBJECT | CLOB } ( integer [ G | K | M ] ) |

  [SYSUDTLIB.] { XML | XMLTYPE } [ ( integer [ G | K | M ] ) ] [ INLINE LENGTH integer ] |

  [SYSUDTLIB.] JSON [ ( integer [ K | M ] ) ] [ INLINE LENGTH integer ]
    [ CHARACTER SET { UNICODE | LATIN } | STORAGE FORMAT { BSON | UBJSON } ] |

  [SYSUDTLIB.] ST_GEOMETRY [ (integer [ K | M ]) ] [ INLINE LENGTH integer ] |

  [SYSUDTLIB.] DATASET [ (integer [ K | M ]) ] [ INLINE LENGTH integer ] 
    STORAGE FORMAT { Avro | CSV [ CHARACTER SET { UNICODE | LATIN } ] }
    [ WITH SCHEMA [database.] schema_name ] |

  [SYSUDTLIB.] { UDT_name | MBR | ARRAY_name | VARRAY_name }
}

使用上の注意

JSONデータ型のSTORAGE FORMATオプションを次としてのみ指定できます。
  • テーブルの列の属性(格納形式のみを指定するため)。
  • CAST文のJSONデータ型宣言の一部。
  • JSONコンストラクタへのオプションのパラメータ。