LIKE operator is used to return a boolean result by finding out if a value matches with the corresponding pattern.
Percentages are used in patterns to serve as the wildcard, and it is accompanied by any readable character or sequence.
Wildcard is a special type of character used to match any character or an entire sequence of characters.
'L%' – This pattern will match anything that starts with an uppercase L.
'%t' – This pattern will match anything that end with a lowercase T.
'%ap%' – This pattern will match anything that contains the character sequence ap.
'F%y' – This pattern will match anything that starts with an uppercase F and ends with a lowercase Y.
'%' – This pattern will match all the records, which it doesn't even involve any pattern matching.
SELECT first_name, last_name
FROM users
WHERE last_name LIKE 'S%'
This query selects all the users where their last names start with the uppercase S.
Once understood thoroughly, you can go back to this page.