LOB Functions
BIT_TO_BLOB
BLOB_FROM_FILE
- BLOB_FROM_FILE(file_pathname)
This function read the contents from the file with VARCHAR type data and returns BLOB type data.
- Parameters:
file_pathname – the path on the server which DB clients like CAS or CSQL are started
- Return type:
BLOB
SELECT CAST(BLOB_FROM_FILE('local:/home/cubrid/demo/lob/ces_622/image_t.00001352246696287352_4131')
AS BIT VARYING) result;
SELECT CAST(BLOB_FROM_FILE('file:/home/cubrid/demo/lob/ces_622/image_t.00001352246696287352_4131')
AS BIT VARYING) result;
BLOB_LENGTH
BLOB_TO_BIT
CHAR_TO_BLOB
CHAR_TO_CLOB
CLOB_FROM_FILE
- CLOB_FROM_FILE(file_pathname)
This function read the contents from the file with VARCHAR type data and returns CLOB type data.
- Parameters:
file_pathname – the path on the server which DB clients like CAS or CSQL are started
- Return type:
CLOB
If you specify the file_pathname as the relative path, the parent path will be the current working directory.
For the statement including this function, the query plan is not cached.
SELECT CAST(CLOB_FROM_FILE('local:/home/cubrid/demo/lob/ces_622/image_t.00001352246696287352_4131')
AS VARCHAR) result;
SELECT CAST(CLOB_FROM_FILE('file:/home/cubrid/demo/lob/ces_622/image_t.00001352246696287352_4131')
AS VARCHAR) result;