Using a BLOB in a where clause in MySQL

I am working on an application that will have to do some data verification by checking the fingerprints stored in the MySQL database. It was suggested to use proprietary software such as "AFIS" .. but I wonder if the check made using the BLOB column in the "where" clause of the select statement can filter the data. Is it possible?

The code I mean looks something like this:

Select id from mytable where image not in (select image from other table) 

With image columns with blob data type

+4
source share
1 answer

You mean something like this:

 SELECT * FROM yourTable WHERE CHAR_LENGTH(your_blob_field) > 0 

char_length () works in the style of a blob column ... if it's nothing but 0, then you know that you have something.

+2
source

Source: https://habr.com/ru/post/1402370/


All Articles