Use the file named b_file.txt and attach it to the myTable table in the col_bfile column. : bfilename « Large Objects « Oracle PL/SQL Tutorial






SQL>
SQL> create table myTable
  2  (key NUMBER PRIMARY KEY
  3  ,col_blob BLOB
  4  ,col_clob CLOB);

Table created.

SQL>
SQL> INSERT INTO myTable (key, col_blob, col_clob)
  2  VALUES (1, HEXTORAW('101F'), 'ZYXW');

1 row created.

SQL>
SQL>
SQL> ALTER TABLE myTable add (col_bfile BFILE);

Table altered.

SQL>
SQL>
SQL>
SQL>
SQL> UPDATE myTable
  2  SET col_bfile = BFILENAME ('INFILE', 'b_file.txt')
  3  WHERE key = 1;

1 row updated.

SQL>
SQL>
SQL> drop table myTable;

Table dropped.

SQL>
SQL>








34.12.bfilename
34.12.1.bfilename function
34.12.2.Use the file named b_file.txt and attach it to the myTable table in the col_bfile column.
34.12.3.Stored procedure to read the data from the BFILE into the clob clob and display the new clob contents.