How can I search inside Blob column in MySQL for some values ? and Is that possible ?
Asked
Active
Viewed 3.7k times
1 Answers
36
You should be able to search blobs like other text fields:
SELECT *
FROM tablename
WHERE blob_field_name LIKE '%value%'
One thing to notice is that search will be case-sensitive!
Anyway, if possible, it's better to use a TEXT
field.

hichris123
- 10,145
- 15
- 56
- 70

Zilverdistel
- 1,571
- 11
- 10
-
Thanks a lot, plus I have to use BLOB not TEXT – Zamblek Sep 22 '10 at 01:48
-
2Just to emphasize when you "Like" search a Blob the search is case sensitive so LIKE '%fred%' is different to LIKE '%Fred%' . – zzapper May 20 '15 at 16:44
-
2Why is it better to use TEXT? Is BLOB slower to interact with? – JBS Jun 12 '18 at 14:33