How to query MySQL for fields containing null characters

I have a MySQL table with a text column. Some rows have null characters (0x00) as part of this text column (along with other characters).

I am looking for a query that will return all rows containing any null characters for this column, but I cannot figure out how the correct syntax for my column is "where column like"% ...% ".

Thanks!

+6
source share
1 answer

Right after I submitted the question, the proposed link to this related question provided my answer: MySQL query with char unicode code

WHERE column LIKE CONCAT ("%", CHAR (0x00 using utf8), "%");

+7
source

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


All Articles