Results for partial or misspelled matches?

This doesn’t really pertain to any exact case, just curious mainly.

Let’s say I have a table that has id and name. Name may be first, last or first.

Let’s say that one entry is ‘Jonathan Black’

If I search on the term ‘Jon’, how would I have to structure my query to return the result since ‘Jon’ is inside ‘Jonathan Black’

Would I be looking at FULL TEXT here?

Thanks in advance!

exactly right

and TEXT columns are most often used for large blocks or paragraphs of, um, text – not short descriptors like a title or a name

:slight_smile:

% is a wildcard character for “Like” queries and represents zero or more characters with any value.

Yes, it’s a wildcard.
For more info see here.

:slight_smile:

I’ve never used the % symbol in a query before, I assume it means that some stuff may come before or after it?

For the example above WHERE name LIKE “Jon%” would work.
For the general case I always do something like this:

WHERE name LIKE “%Jon%” AND name LIKE “%Smi%”

When someone looks for “Jon Smi”

FULLTEXT is only really needed to search through a lot of text, like fields with the text datatype. At least that’s how I use it :slight_smile: