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;