How can I make a MySQL query asking for all the string fields in a column that have a particular length?
Thanks!
Use LENGTH() for checking length in bytes:
SELECT str FROM sometable WHERE LENGTH(str) = 5;
Or CHAR_LENGTH() for checking length in number of characters (useful for multi-byte strings):
SELECT str FROM sometable WHERE CHAR_LENGTH(str) = 5;