I have a table called
SELECT * FROM tabela1512823699024883 WHERE `age` = 'male'
Same issue will occur with casting a string to an integer type.
SELECT CAST('male' as SIGNED); #0 #or SELECT CAST('male' as UNSIGNED); #0
However if a number is supplied within the string.
SELECT CAST('1234male' as UNSIGNED); #1234 #and SELECT CAST('male1234' as UNSIGNED); #0
To resolve the issue use
BINARY on the column, which will also cause the textual value to become case-sensitive.
SELECT * FROM tabela1512823699024883 WHERE BINARY `age` = 'male';