Write a query to find the names of employees that begin with ‘S’
Use LIKE with the wildcard %. Here we use an employees table with a name column.
SELECT name
FROM employees
WHERE name LIKE 'S%';
'S%' means: starts with S, followed by anything. For names that end with S use '%S', and for names that contain S anywhere use '%S%'. See MySQL LIKE.
Learn more about the similar topics:
| Tutorials |
|---|
| MySQL SELECT Statement |
| MySQL WHERE Clause |
| MySQL AND, OR and NOT |
| MySQL ORDER BY |
| MySQL LIMIT |
| MySQL DISTINCT |
| MySQL LIKE and Wildcards |