Using 'LIKE' to search for a distinct word


For task 14 of the queries project 'Return all movies that include 'King' in the name.' I'm getting all words that contain the 4 letters of king together, how would i look for rows where king is a distinct word? Adding a '%' at either end works in excluding words where 'king' is part of another word (e.g 'talking') but also excludes results were 'king' is a unique word at the opposite end of the text string to the '%'

Instead of getting the following results

Indiana Jones and the Kingdom of the Crystal Skull
King Kong
Look Whos Talking
The Lion King
The Twilight Saga: Breaking Dawn - Part 1
The Twilight Saga: Breaking Dawn - Part 2

I'd just like to return 'King Kong' and ' The Lion King'

SELECT * FROM movies WHERE name LIKE '%King%';


Here is a discussion about the best way to do that:


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.