is there a way to write an sql query that finds all rows where the field value is a substring of a given string.
Example:
table names Name | N
SELECT * FROM names WHERE INSTR(Nickname,Name) > 0;
or, equivalently:
SELECT * FROM names WHERE LOCATE(Name,Nickname) > 0;