VARCHAR Data Type Examples - Teradata VantageCloud Lake

Lake - Working with SQL

Deployment
VantageCloud
Edition
Lake
Product
Teradata VantageCloud Lake
Release Number
Published
February 2025
ft:locale
en-US
ft:lastEdition
2025-11-21
dita:mapPath
jbe1714339405530.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
jbe1714339405530

Example: VARCHAR Data Type

The following statement creates a table that defines two VARCHAR columns: InfoKey and InfoData.

CREATE TABLE InfoTable
  (InfoKey VARCHAR(10) NOT NULL
  ,InfoData VARCHAR(16384) )
UNIQUE PRIMARY INDEX ( InfoKey );

The following statements insert character data of varying lengths into the InfoKey and InfoData columns:

INSERT INTO InfoTable ('001_5_799', 'Data for key 001_5_799');
INSERT INTO InfoTable ('2', 'Data for key 2');

Example: LONG VARCHAR Data Type

The following statement creates a table that defines a LONG VARCHAR column called InfoData.

CREATE TABLE InfoTable (InfoData LONG VARCHAR);