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
  3    Subject VARCHAR(256),
  4    Body BLOB);

Table created.

Table of Contents

 About This Book

 JDBC (Java Database Connectivity) Introduction

 JDK (Java SE) Installation

 Oracle Express Edition Installation on Windows

 Oracle JDBC Drivers

 Oracle - Reference Implementation of JdbcRowSet

 Oracle - PreparedStatement

 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

 Using Connection Pool with JDBC

 Archived Tutorials


 Full Version in PDF/EPUB