Initialize blob type data : blob « Data Type « Oracle PL / SQL






Initialize blob type data

 

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

Table created.

SQL>
SQL>
SQL> CREATE OR REPLACE PROCEDURE initialize_blob(blob_par IN OUT BLOB,id_par IN INTEGER)IS
  2  BEGIN
  3    SELECT blob_column
  4    INTO blob_par
  5    FROM myTable
  6    WHERE id = id_par;
  7  END initialize_blob;
  8  /

Procedure created.

SQL>
SQL> drop table myTable;

Table dropped.

   
  








Related examples in the same category

1.Read data in for sql statement
2.Blob type column
3.Read blob type data, DBMS_LOB.READ
4.A PL/SQL block to read an operating system file called BLOB.JPG that contains 1 row of binary data.