Reputation: 101
Does anyone know how i can enter an integer or hexadecimal value into a BLOB in mysql?
The endresult that i need is that the binary data of my blob contains:
Offset 1 2 3 4 5 6 7 8 9 A B C D E F
___________________________________________________________
0x00000000 15 AA 02 00 00 00 00 00 00 00 00 00 00 00 00
The current blob holds the value : 174613
So how would i write an insert/update query to put that value into this BLOBb?
Upvotes: 0
Views: 2146
Reputation: 101
Found a solution:
insert into tablename(columnname) values(x'15AA02000000000000000000000000')
columnname
has to be of type BLOB
.
Upvotes: 1