O'Reilly logo

Oracle Advanced PL/SQL Developer Professional Guide by Saurabh Gupta

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Working with the CLOB, BLOB, and BFILE data types

By now, we have gathered enough understanding on the LOB data types. We will now see the handling of LOB data in PL/SQL. For illustration purposes, we will use the EMP_LOB_DEMO table, which has been created earlier.

Initializing LOB data type columns

As we learned earlier the LOB column in the table contains only the pointer (LOB locator), while the actual data is stored in the LOB segment. The LOB segment is a different storage area in the same or different tablespace.

For initialization of a LOB data type variable or column, Oracle provides two built-in constructor methods namely, EMPTY_CLOB() and EMPTY_BLOB(). These functions are supported in SQL as well as PL/SQL. The functions assign a default ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required