BFILE column and directory : BFILE « Large Objects « Oracle PL/SQL Tutorial






SQL> CREATE TABLE myBFile
  2  (id NUMBER PRIMARY KEY,
  3   bfile_data BFILE);

Table created.

SQL>
SQL> CREATE DIRECTORY bfile_dir AS 'c:\proj';


SQL>
SQL> DECLARE
  2    bfileValue BFILE;
  3  BEGIN
  4    INSERT INTO myBFile VALUES (1,BFILENAME('BFILE_DIR','test.bmp'));
  5    SELECT bfile_data
  6    INTO bfileValue
  7    FROM myBFile
  8    WHERE id = 1;
  9
 10  END;
 11  /

PL/SQL procedure successfully completed.

SQL>
SQL>
SQL> drop table myBFile;

Table dropped.

SQL>








34.2.BFILE
34.2.1.Creating Tables Containing BFILE Objects
34.2.2.Populating a BFILE Column with a Pointer to a File
34.2.3.Populating BFILE
34.2.4.BFILE type column
34.2.5.BFILE value and BFILENAME function
34.2.6.BFILE column and directory
34.2.7.Create a BFILE locator
34.2.8.Retrieve the LOB locater
34.2.9.Use a BFILE to load a LOB column