Adding Content to a BLOB : BLOB « Large Objects « Oracle PL/SQL Tutorial






SQL>
SQL> CREATE TABLE myTable (
  2    id          INTEGER PRIMARY KEY,
  3    blob_column BLOB NOT NULL
  4  );

Table created.

SQL>
SQL> INSERT INTO myTable(id, blob_column) VALUES (1, EMPTY_BLOB());

1 row created.

SQL>
SQL> UPDATE myTable
  2  SET blob_column = 'VVVVV'
  3  WHERE id = 1;
SET blob_column = 'VVVVV'
                  *
ERROR at line 2:
ORA-01465: invalid hex number


SQL>
SQL> SELECT *
  2  FROM myTable;
SP2-0678: Column or attribute type can not be displayed by SQL*Plus
SQL>
SQL> drop table myTable;

Table dropped.

SQL>








34.3.BLOB
34.3.1.Creating Tables Containing BLOB Objects
34.3.2.Initialize BLOB column data
34.3.3.Adding Content to a BLOB
34.3.4.Use update statement to change the value in blob type column
34.3.5.UPDATE sets blob_column to a binary number:
34.3.6.Open the BLOB
34.3.7.Loading a page to a BLOB
34.3.8.Populating a BLOB column from an external BFILE
34.3.9.INSERT a row with an empty blob
34.3.10.Display the length of the BLOB
34.3.11.Obtain length of the populated BLOB
34.3.12.Close the BLOB