Chinese Yellow Pages | Classifieds | Knowledge | Tax | IME

http://www.ovaistariq.net/632/understanding-mysql-binary-and-non-binary-string-data-types/

http://artarmstrong.com/blog/2014/12/07/store-uuid-as-binary16-mysql-data-type/

http://stackoverflow.com/questions/9081216/mysql-insert-statement-to-binary-datatype

e.g:

CREATE TABLE `Test` (
`myhash` binary(16) DEFAULT NULL
)

Insert

10E8400E29B11D4A716446655440000 as HEX representation of some chars

Insert into `Test` values ( UNHEX(“110E8400E29B11D4A716446655440000”) );

MySQL standard is to use this notation to denote the string as binary… X’9fad5e9eefdfb449′
insertinto assignedresource values(X’9fad5e9eefdfb449′);

Search

select hex(myhash) from Test where myhash=UNHEX(“110E8400E29B11D4A716446655440001”);

Leave a Reply

Your email address will not be published. Required fields are marked *