MySQL statement
mysql> select * from field where dflt=' '
appears to match empty values; and is different from statement
mysql> select * from field where concat('_',dflt,'_') = '_ _';
I couldn’t find a description of this behavior in MySQL reference. How can I make MySQL interpret
input literally?
EDITED: This indeed won’t match NULL values, but it does match empty values.
As mentioned in The
CHARandVARCHARTypes:The definition of the
LIKEoperator states:As mentioned in this answer: