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!
r937
2
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

% is a wildcard character for “Like” queries and represents zero or more characters with any value.
rpkamp
4
Yes, it’s a wildcard.
For more info see here.

I’ve never used the % symbol in a query before, I assume it means that some stuff may come before or after it?
rpkamp
6
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 