Oracle Plsql Empty_blob Function

Oracle / PLSQL: EMPTY_BLOB Function

This Oracle tutorial explains how to use the Oracle/PLSQL EMPTY_BLOB function with syntax and examples.

Description

The Oracle/PLSQL EMPTY_BLOB function can be used to initialize a LOB column to EMPTY in an INSERT statement or UPDATE statement or it can be used initalize a LOB variable.

Syntax

The syntax for the EMPTY_BLOB function in Oracle/PLSQL is:

EMPTY_BLOB ()

Parameters or Arguments

There are no parameters or arguments for the EMPTY_BLOB function.

Returns

The EMPTY_BLOB function returns an empty LOB locator.

Applies To

The EMPTY_BLOB function can be used in the following versions of Oracle/PLSQL:

  • Oracle 12c, Oracle 11g, Oracle 10g, Oracle 9i, Oracle 8i

Example

Let's look at some Oracle EMPTY_BLOB function examples and explore how to use the EMPTY_BLOB function in Oracle/PLSQL.

For example:

UPDATE products
SET product_photo = EMPTY_BLOB();

This EMPTY_BLOB example would initialize the product_photo column to EMPTY. This is different than setting the column to a null LOB or a LOB with a string length of 0.