Examples - Teradata Vantage - Analytics Database

SQL Data Types and Literals

Deployment
VantageCloud
VantageCore
Edition
VMware
Enterprise
IntelliFlex
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
ft:locale
en-US
ft:lastEdition
2025-11-06
dita:mapPath
uds1628112204571.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
exs1472253032394
lifecycle
latest
Product Category
Teradata Vantage™

Defining BLOB Data

The following example creates a table that defines a BLOB column named blarge:

CREATE TABLE t1
  (id INTEGER
  ,blarge BLOB(128K));

Inserting BLOB Data

The following example shows a stored procedure that inserts part of a BLOB into one table and the remaining part of the BLOB into another table:

CREATE TABLE LocalData(ld_ID INTEGER, ld_DATA BLOB);
CREATE TABLE GlobalData (gd_ID INTEGER, gd_DATA BLOB);

CREATE PROCEDURE DataSplitter(IN local_ID  INTEGER,
                              IN global_ID INTEGER,
                              IN all_DATA  BLOB)

BEGIN

   INSERT LocalData (local_ID, SUBSTRING(all_DATA FROM 1 FOR 128546));
   INSERT GlobalData (global_ID, SUBSTRING(all_DATA FROM 128547));

END;