devxlogo

Performing a Word Search in SQL

Performing a Word Search in SQL

Question:
How do I perform a word search in SQL? I want to find all rows containing the word “time” by itself and not any rows containing “time” as part of another word.

Answer:
This may get you started:

select memos from mytable where memos like ' time ' 

This will get the standalone occurrences of “time”.

If you want the embedded ones too, try using this:

'%time%'

devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist