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