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
One problem with all these approaches is your indexes go right out the window. You'll have to do a table scan for each and every row, which means your performance will only get worse and worse as the table size grows.
I'd rethink this approach if your table is going to be large. Maybe you need a indexed searcher like Lucene.