1

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?

1 Answer 1

2

Found a solution:

insert into tablename(columnname) values(x'15AA02000000000000000000000000')

columnname has to be of type BLOB.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.