MySQL using WHERE clause with multiple LIKEs
I have a simple table with names, some beginning with a letter and some
beginning with a number. I am trying to filter out the names that start
with a number, and only select the names that start with a letter of the
alphabet.
Here are a few of my attempts, which have failed to produce the desired
results:
SELECT name
from subjects
WHERE name LIKE ('A%') AND
WHERE name LIKE ('B%') AND
WHERE name LIKE ('C%')...;
SELECT name
from subjects
WHERE name LIKE ('A%', 'B%', 'C%', ...);
SELECT name
from subjects
WHERE name LIKE ('A%') AND ('B%') AND ('C%') ...;
Thank you, in advance, for your help. I appreciate it very much. Stack
Overflow has been my savior so many times as I am learning to program with
PHP and MySQL. Lori
No comments:
Post a Comment