• Skip to primary navigation
  • Skip to main content

Tech Honey

The #1 Website for Oracle PL/SQL, OA Framework and HTML

  • Home
  • HTML
    • Tags in HTML
    • HTML Attributes
  • OA Framework
    • Item in OAF
    • Regions in OAF
    • General OAF Topics
  • Oracle
    • statement
    • function
    • clause
    • plsql
    • sql
You are here: Home / Oracle / function / BFILENAME Function in Oracle SQL – PLSQL

BFILENAME Function in Oracle SQL – PLSQL

November 27, 2012 by techhoneyadmin

The BFILENAME function in Oracle SQL / PLSQL is used to get a BFILE locator for a LOB file at a physical location.

Syntax for the BFILENAME function in Oracle SQL / PLSQL is:

SELECT BFILENAME(‘directory’, ‘file_name’)
FROM table_name;

  • directory is the folder / directory object which serves as an alias name for the full path where the file is placed on the file server.
  • file_name is the name of the file on the server.

Example:

First we need to create a directory say ‘sampleDir’ that will point to the a location say ‘/sample/files/techhoney’ location on the server as follows:

CREATE DIRECTORY sampleDir as '/sample/files/techhoney';

Now we can use the ‘sampleDir’ directory object in the BFILENAME function as shown below:

SELECT BFILENAME('sampleDir','report.pdf')
FROM dual;

Filed Under: function Tagged With: BFILENAME function in oracle plsql, BFILENAME function in oracle sql, BFILENAMEPLSQL, how to use BFILENAME function in oracle database query, how to use BFILENAME function in oracle plsql, how to use BFILENAME function in oracle sql, syntax and example of BFILENAME function in oracle database query, syntax and example of BFILENAME function in oracle plsql, syntax and example of BFILENAME function in oracle sql, using BFILENAME function in oracle database query, using BFILENAME function in oracle plsql, using BFILENAME function in oracle sql

Copyright © 2023 · Parallax Pro on Genesis Framework · WordPress · Log in