Search for value within BLOB column in MySQL

D3VELOPER picture D3VELOPER · Sep 19, 2010 · Viewed 27.7k times · Source

How can I search inside Blob column in MySQL for some values ? and Is that possible ?

Answer

Zilverdistel picture Zilverdistel · Sep 19, 2010

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.