Oracle / PLSQL: EMPTY_BLOB Function

This article is written about how to use the Oracle/PLSQL EMPTY_BLOB function with syntax and examples.


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.


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


Parameters or Arguments

There are no parameters or arguments for the EMPTY_BLOB function.


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


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.