Quick Search:
CODE
Oracle PL/SQL Code Library
JOBS
Find Or Post Oracle Jobs
FORUM
Oracle Discussion & Chat
 The Oracle EMPTY_BLOB Directive      [Return To Index] Jump to:  
  Looking for the original pages? (formerly called "Morgan's Library") You can find them here.

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      :      Code Library      :      Sponsors      :      Privacy      :      Terms of Use      :      Contact Us 245 users online    © 2009 psoug.org
PSOUG LOGIN
Username: 
Password: 
Forgot your password?