JDBC Type 4 Driver 1.1 Programmer's Reference

Character large object data
BLOB
Binary large object data
Note:
The CLOB and BLOB data type specification is special syntax that is allowed for use in base tables accessed by
the Type 4 driver described in this manual.
Using MXCI To Create Base Tables that Have LOB Columns
Before using the procedure to create the tables, note that when using MXCI to create base tables, you must enter the
following special command in the MXCI session to enable the base-table creation of tables that have LOB (BLOB or
CLOB) columns:
CONTROL QUERY DEFAULT JDBC_PROCESS 'TRUE'
Follow these steps to create a base table that has LOB columns:
At the OSS prompt, invoke the SQL/MX utility MXCI. Type:
mxci
1.
Type the following command to enable creating tables that have LOB columns:
CONTROL QUERY DEFAULT JDBC_PROCESS 'TRUE';
2.
Type the CREATE TABLE statement; for example, you might use the following simple form of the statement:
CREATE TABLE table1 (c1 INTEGER NOT NULL, c2 CLOB, c3 BLOB, PRIMARY KEY(c1));
3.
where
table1
The name of the base table.
Note:
If different LOB tables are used for storing BLOB or CLOB data, the base table name for a
table with BLOB or CLOB columns must be unique across all catalogs and schemas.
Otherwise, the driver will give incorrect data to the application in cases where the LOB
tables used get erroneously switched or changed.
c1
Column 1, defined as the INTEGER data type with the NOT NULL constraint.
c2
Column 2, defined as the CLOB data type.
c3
Column 3, defined as the BLOB data type.
PRIMARY KEY
Specifies c1 as the primary key.
Use this example as the archetype for creating base tables. For information about valid names for tables (table1) and
columns (c1, c2, and c3) and for information about the CREATE TABLE statement, see the SQL/MX Reference Manual.
Using JDBC Programs To Create Base Tables that Have LOB Columns
When using a JDBC Program to create base tables that have LOB columns, put the CREATE TABLE statements in the
program as you would any other SQL statement. For an example of the CREATE TABLE statement, see the discussion
Using MXCI to Create Base Tables that Have LOB Columns.