JDBC Type 2 Driver Programmer's Reference for SQL/MX Release 3.2.1 (H06.26+, J06.15+)
5 Managing the SQL/MX Tables for BLOB and CLOB Data
BLOB and CLOB are not native data types in an SQL/MX database. But, database administrators
can create SQL/MX tables that have BLOB and CLOB columns by using the JDBC/MX driver or
special SQL syntax in MXCI as described in this section. For management purposes, CLOB and
BLOB data is referred to as large object (LOB) data, which can represent either data type.
NOTE: Support for BLOB and CLOB data requires SQL/MX tables.
Before using this section, be sure to see the file descriptions for the tables that contain LOB data.
This information is under the topic “Architecture for LOB Support” (page 44) in the preceding
section.
With the exception above, this section provides the information that database administrators need
to create and manage the tables required to support LOB data. The topics are:
• “Creating Base Tables that Have LOB Columns” (page 54)
• “Managing LOB Data by Using the JDBC/MX Lob Admin Utility” (page 55)
• “Using SQL/MX Triggers to Delete LOB Data” (page 57)
• “Limitations of the CLOB and BLOB Data Types” (page 57)
Creating Base Tables that Have LOB Columns
You can write JDBC programs to create base tables that have LOB columns or you can use the
SQL/MX conversational interface MXCI as described in the following topics:
• “Data Types for LOB Columns” (page 54)
• “Using MXCI To Create Base Tables that Have LOB Columns” (page 54)
• “Using JDBC Programs To Create Base Tables that Have LOB Columns” (page 55)
Data Types for LOB Columns
The data types for the LOB columns are:
CLOB
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 JDBC/MX driver as 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:
54 Managing the SQL/MX Tables for BLOB and CLOB Data










