Binary data types

The binary18 and binaryvar data types allow you to store binary-encoded strings, which can be indexed for quick retrieval.

You can use string manipulation functions to validate the data types and bitwise operation functions that allow you to perform bitwise logical AND, OR, XOR comparisons or apply a bitwise logical NOT to a string.

Because the binary data types are unstructured types, they can store many different types of information, for example, IP addresses, MAC addresses, or device identification numbers from RFID tags. The binary data types can also store encrypted data in binary format, which saves disk space. Instead of storing an IP address like xxx.xxx.xxx.xxx as a CHAR(15) data type, you can store it as a binaryvar data type, which uses only 6 bytes.