I need to display a group of names from a list of publishers that contain the word "and" in them, but not display words that contain the letters "and" in them (like the word Random). How would I go about this? I'm new to all of this and haven't been able to find an answer to this question yet if there is one.
here's an example of the table:
FS |Farrar Straus and Giroux|New York
VB |Vintage books |New York
Basically I just want to see the publisher names that contain the word 'and'.
"And" is actually a relatively easy word to handle, as it can only appear in the middle of a sentence (name). Just slap a couple of whitespaces around it, and you should be OK:
SELECT * FROM publishers WHERE UPPER(name) LIKE '% AND %'; -- Note the spaces -------^---^