Ask Your Question

How to search a Base Database for a certain phrase.

asked 2017-05-16 10:45:21 +0100

Paradoxical gravatar image

updated 2017-05-16 15:39:54 +0100

EasyTrieve gravatar image

I'm trying to search one of the columns of my database for any records which include a certain word. I have not been able to find any way of doing this with the wizard, and my knowledge of SQL isn't great enough to come up with the command needed.

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted

answered 2017-05-16 14:02:38 +0100

Ratslinger gravatar image

updated 2017-05-16 14:03:08 +0100

SQL is what you need. For selecting a specific phrase:


This statement will search the field for the word group master form. The UPPER is used so case is not a concern. If you would want case sensitive:


More information on 'LIKE' usage can be found on this page - click here.

If this answers your question please click on the ✔ (upper left area of answer).

edit flag offensive delete link more


The above SQL Select statement searches for your specific phrase only in 1 field of 1 table inside your database. Since a database can have multiple tables, and table can have multiple fields, you'd need to repeat ( or combine with OR's ) the above steps for every tablefield in your database that could possibly contain the specific phrase.

librebel gravatar imagelibrebel ( 2017-05-17 05:39:22 +0100 )edit

answered 2017-05-16 15:54:33 +0100

EasyTrieve gravatar image

There are a number of ways to do this, and which method you use might depend on how big your database is.

For large databases you'll want to use a native database full text search feature like this one found in the MariaDB / MySQL db engine.

The advantage is that the database keeps an index of all words, and so can very quickly search a large database for a string of words.

It's also harder to use and setup, but I have used it for large databases driven by php code and it works very well.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2017-05-16 10:45:21 +0100

Seen: 310 times

Last updated: May 16 '17