Binary data type examples

Example 1: binaryvar data type

The following code stores the binary string of 0123456789 on disk:
CREATE TABLE  bindata_test (int_col integer, bin_col binaryvar)

INSERT INTO bindata_test values (1, '30313233343536373839')
INSERT INTO bindata_test values (2, '0X30313233343536373839')

Example 2: binary18 data type

The following code inserts the string IBMCORPORATION2006:
CREATE TABLE bindata_test (int_col integer, bin_col binary18)

INSERT INTO bindata_test values (1,'49424d434f52504f524154494f4e32303036')
INSERT INTO bindata_test values (2,'0x49424d434f52504f524154494f3e32303036')