JDBC for Oracle - Herong's Tutorial Examples - v3.13, by Herong Yang
Create Tables with CLOB Columns
This section describes how to create tables with BLOB (LONGBLOB) columns in Oracle server.
Oracle support BLOB with the BLOB data type:
In order to test BLOB columns in Oracle server, I used the Oracle command line interface to create a test table with one BLOB column:
herong> sqlplus Enter user-name: Herong/TopSecret SQL> -- Create the test table with a BLOB column 2 CREATE TABLE Image (ID INTEGER PRIMARY KEY, 3 Subject VARCHAR(256), 4 Body BLOB); Table created.
Table of Contents
JDBC (Java Database Connectivity) Introduction
Oracle Express Edition Installation on Windows
Oracle - Reference Implementation of JdbcRowSet
Oracle - JBDC CallableStatement
Oracle CLOB (Character Large Object) - TEXT
►Oracle BLOB (Binary Large Object) - BLOB
Overview of BLOB (Binary Large Object)
►Create Tables with CLOB Columns
Inserting BLOB Values with SQL INSERT Statements
Inserting BLOB Values with setBytes() Method
Inserting BLOB Values with setBinaryStream() Method
Closing InputStream Too Early on setBinaryStream()
Retrieving BLOB Values with getBytes() Method
Retrieving BLOB Values with getBinaryStream() Method
Retrieving BLOB Values with getBlob() Method
Inserting BLOB Values with setBlob() Method
Copying BLOB Values to New Rows