How can I SELECT my_column FROM my_table, but my_column may only contain digits (0-9), spaces ( ) and ONE slash (/). More than one slashes are not allowed (per field). Other characters are not allowed.
Can any body give me a hint how to do that?
Use regexp
:
SELECT my_column
FROM my_table
WHERE my_column REGEXP '^[0-9 ]*/[0-9 ]*$';