Quick Search:
 
 The Oracle EMPTY_BLOB Directive      [Return To Index] Jump to:  

Term: EMPTY_BLOB

Definition:
The EMPTY_BLOB directive is used to initialze a BLOB attribute of a table. It returns an empty LOB locator which can be assigned to LOB variable, substituted for LOB columns during an INSERT or an UPDATE on the table. Note that empty LOB locators are not NULL, but initialized.

Usage Examples

The following example initializes the IMAGE column of the IMAGE_TAB table to an empty LOB locator:

UPDATE IMAGE_TAB
SET IMAGE = EMPTY_BLOB();


During TABLE definitions, EMPTY_BLOB can be used to set the default value of a column:

CREATE TABLE IMAGE_TAB
(IMG_ID NUMBER,
IMG_TITLE VARCHAR2(255),
IMAGE BLOB DEFAULT EMPTY_BLOB() );


It can be also used to substitute LOB columns during DML:

INSERT INTO IMAGE_TAB 
VALUES
(SEQ_IMG_ID.NEXTVAL, 'IMAGE 2010', EMPTY_BLOB());


Related Links:
 
   Home |    Search |    Code Library |    Sponsors |    Privacy |    Terms of Use |    Contact Us © 2003 - 2024 psoug.org