Search code examples
sql

How can I use the LIKE operator to match certain characters exactly


What I want to do is to filter out headings starting with the word "Cyber" but having no trailing characters. For example words like "Cyber space" or "Cyber attacks" but not words like "Cybersecurity".


Solution

  • You want to filter out values that have a space after "Cyber". So that would be:

    where heading not like 'Cyber %'