16.20 - Example: Create Tables with ST_GEOMETRY Data Type Columns - Teradata Database - Teradata Vantage NewSQL Engine

Teradata Vantage™ SQL Data Definition Language Syntax and Examples

Product
Teradata Database
Teradata Vantage NewSQL Engine
Release Number
16.20
Published
March 2019
Language
English (United States)
Last Update
2019-05-24
dita:mapPath
wkf1512081455740.ditamap
dita:ditavalPath
TD_DBS_16_20_Update1.ditaval

This example creates a table with an ST_GEOMETRY column that is non-LOB.

CREATE TABLE geoTable1(id INTEGER,
                       geo1 ST_GEOMETRY(64000));

This example creates a table with the following types of ST_GEOMETRY columns: non-LOB, LOB, and LOB with a specified inline length.

CREATE TABLE geoTable2(id INTEGER,
                       geo1 ST_GEOMETRY(100),
                       geo2 ST_GEOMETRY,
                       geo3 ST_GEOMETRY INLINE LENGTH 30000);

This example uses a different syntax to create the same structure as geoTable2.

CREATE TABLE geoTable3(id INTEGER,
                       geo1 ST_GEOMETRY(100) INLINE LENGTH 100,
                       geo2 ST_GEOMETRY,
                       geo3 ST_GEOMETRY INLINE LENGTH 30000);

This example creates a table with the following types of ST_GEOMETRY columns: non-LOB and LOB with specified inline lengths.

CREATE TABLE geoTable4(id INTEGER,
                       geo1 ST_GEOMETRY(30000) INLINE LENGTH 30000,
                       geo2 ST_GEOMETRY INLINE LENGTH 100);

This example creates a table with an ST_GEOMETRY column that is an LOB with a specified inline length.

CREATE TABLE geoTable5(id INTEGER,
                       geo1 ST_GEOMETRY(64000) INLINE LENGTH 100);