BFILENAME function : bfile « Large Objects « Oracle PL / SQL






BFILENAME function

  
SQL>
SQL> CREATE TABLE lobdemo (
  2    key NUMBER,
  3    bfile_col BFILE);

Table created.

SQL>
SQL> CREATE DIRECTORY utils AS '/home/utils';


SQL>
SQL> CREATE DIRECTORY code AS '/home/code';


SQL>
SQL> INSERT INTO lobdemo (key, bfile_col)
  2    VALUES (10, BFILENAME('utils', 'file1.txt'));

1 row created.

SQL>
SQL> INSERT INTO lobdemo (key, bfile_col)
  2    VALUES (11, BFILENAME('utils', 'file2.txt'));

1 row created.

SQL>
SQL>
SQL> drop table lobdemo;

Table dropped.

   
  








Related examples in the same category

1.Create the BFILE directory
2.Two locators pointing to the same file
3.Insert value to bfile column
4.BFILE File Operations
5.BFILE Comparisons
6.Call BFILENAME to get pointer to a BFILE