TO_BLOB
The TO_BLOB function converts VARBINARY or BINARY to a BLOB:
This function is not supported in TimesTen Scaleout.
SQL syntax
TO_BLOB ( ValidDataType )Parameters
TO_BLOB has the parameters:
| Parameter | Description |
|---|---|
|
|
A value that is of |
Examples
The following example creates a table with a BINARY and a VARBINARY columns. The TO_BLOB function is used on the values of these columns to convert the BINARY and VARBINARY data to a BLOB.
Command> CREATE TABLE bvar(col1 BINARY (10), col2 VARBINARY (10)); Command> INSERT INTO bvar (col1, col2) VALUES (0x4D7953514C, 0x39274D); 1 row inserted. Command> SELECT * FROM bvar; < 4D7953514C0000000000, 39274D > 1 row found. Command> SELECT TO_BLOB(col1), TO_BLOB(col2) FROM bvar; < 4D7953514C0000000000, 39274D > 1 row found.