Purpose
This function converts a LONG RAW value or a RAW value to a BLOB value.
Syntax
TO_BLOB( raw_value )
Parameters
The raw_value parameter specifies a LONG RAW or RAW value.
Return type
The return type is BLOB.
Examples
Assume that a table named tbl_raw has been created. Convert a RAW value to a BLOB value and return the byte length.
obclient> SELECT COL_RAW,LENGTHB(COL_RAW) "LENGTHB_RAW",LENGTHB(TO_BLOB(COL_RAW)) "LENGTHB_BLOB"
FROM tbl_raw;
+------------------+-------------+--------------+
| COL_RAW | LENGTHB_RAW | LENGTHB_BLOB |
+------------------+-------------+--------------+
| 0ABC | 4 | 2 |
| 0123456789ABCDEF | 16 | 8 |
+------------------+-------------+--------------+
2 rows in set
