Binary strings are compatible only with other binary strings. Other data types can be treated as a binary-string data type by using the BINARY, VARBINARY, or BLOB scalar functions to cast the data type to a binary string.
If one operand column is... | And the other operand is... | The data type of the result column is... |
---|---|---|
BINARY(x) | BINARY(y) | BINARY(z) where z = max(x,y) |
VARBINARY(x) | VARBINARY(y) or BINARY(y) | VARBINARY(z) where z = max(x,y) |
BLOB(x) | BLOB(y) or VARBINARY(y) or BINARY(y) | BLOB(z) where z = max(x,y) |
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.