17.10 - CREATE TYPE構文(ARRAY/VARRAY形式) - Advanced SQL Engine - Teradata Database

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

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

1次元ARRAY - Teradata形式

CREATE TYPE [SYSUDTLIB.] array_type_name
  AS data_type ARRAY [ number_of_elements ]
  [ DEFAULT NULL ] [;]

1次元VARRAY - Oracle互換形式

CREATE TYPE [SYSUDTLIB.] array_type_name
  AS { VARYING ARRAY | VARRAY } ( number_of_elements ) OF data_type
  [ DEFAULT NULL ] [;]

多次元ARRAY - Teradata形式

CREATE TYPE [SYSUDTLIB.] array_type_name
  AS data_type ARRAY [ { lower_bound : upper_bound | maximum_size } ]
  [ DEFAULT NULL ] [;]

多次元ARRAY - Oracle互換形式

CREATE TYPE [SYSUDTLIB.] array_type_name
  AS { VARYING ARRAY | VARRAY } ( { lower_bound : upper_bound | maximum_size } )
    OF data_type [ DEFAULT NULL ] [;]

ARRAYデータ型

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
}