How the MATCH() Function Works in MySQL

In MySQL, the MATCH() function performs a full-text search. It accepts a comma separated list of table columns to be searched.

The table/s must have a FULLTEXT index before you can do a full-text search against them (although boolean queries against a MyISAM search index can work — albeit slowly — even without a FULLTEXT index).

You can create a FULLTEXT index when creating the table (using the CREATE TABLE statement), or you can use the ALTER TABLE statement or the CREATE INDEX statement if the table already exists.

By default, the search is case-insensitive. To perform a case-sensitive search, use a case-sensitive or binary collation for the indexed columns.

Read more

How NOT LIKE Works in MySQL

In MySQL, you can use NOT LIKE to perform a negation of the LIKE operator. In other words, NOT LIKE returns the opposite result to LIKE.

If the string matches the pattern provided, the result is 0, otherwise it’s 1.

The pattern doesn’t necessarily need to be a literal string. This function can be used with string expressions and table columns.

Read more