Read MySQL binary(16) UUID with Java
问题 This should be a very simple question, I'm just missing something basic here and I'm having 'one of those days...' Cannot use Hibernate or other ORM. Using Java PreparedStatement. MySQL stuff: CREATE TABLE `article` ( `articleID` binary(16) NOT NULL, `publisherID` bigint(20) DEFAULT NULL, PRIMARY KEY (`articleID`), ) ENGINE=InnoDB DEFAULT CHARSET=utf8$$ insert into article ( articleID, publisherID ) values ( (UNHEX(REPLACE(UUID(),'-',''))), 1111 ); Java stuff PreparedStatement ps = connection