I have a column with type binary(16) not nullin mysql table. Not all records have data in this column, but since it sets a ban on them NULL, such records have an all-zero value.
I want to exclude these all null entries from the request.
So far, the only solution I can find is HEXvalue and comparison:
SELECT uuid
FROM example
WHERE HEX(uuid) != '00000000000000000000000000000000'
which works, but is there a better way?
source
share