BLOB and CLOB
datatypes are created by use of the CREATE
or ALTER TABLE or the CREATE
or ALTER TYPE commands. In fact, they are
created identically to other non-sized datatypes
such as DATE and LONG with the exception of the
LOB storage clause.
blob storage requires
package an easy interface tio Oracle BLOB
storage clause is not needed if the maximum size
of the BLOB doesn't exceed 4000 bytes. Up to
4000 bytes can be stored in-line with the other
data in the tablespace. If the length of the
BLOB exceeds 4000 bytes it must be stored in
either a system defaulted storage (the same as
the default for the table it resides in) or in
an explicitly defined LOB storage area.
always specify the LOB storage clause, if you
force the system to do a default storage each
time a BLOB or CLOB exceeds 4000 bytes you could
cause datafile fragmentation and performance
problems. The LOB storage clause gives you
control instead of the system.
creation of a table using a Oracle BLOB datatype is
shown in Listing 1. It just as easily could have
been a CLOB.
table internal_graphics (
store as glob_store (
(initial 100k next 100k pctincrease 0)
(initial 1m next 1m pctincrease 0);