I want to only show results where the length of a BLOB is greater then 1.
The LENGTH() function returns the length of a string (in bytes).
Learn MySQL from scratch for Data Science and Analytics To get the longest varchar length, you need to use CHAR_LENGTH().
The LENGTH() (MySQL) or LEN() (MSSQL) function will return the length of a string in a column that you can use as a condition in your WHERE clause.
To query for string fields with a specific length, use the char_length() or length() from MySQL.
Try this:
SELECT * FROM your_table
WHERE OCTET_LENGTH(blob_field) > 1
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With