(Note: This is for MySQL’s SQL, not SQL Server.)
I have a database column with values like ‘abc def GHI JKL’. I want to write a WHERE clause that includes a case-insensitive test for any word that begins with a specific letter. For example, that example would test true for the letters a,c,g,j because there’s a ‘word’ beginning with each of those letters. The application is for a search that offers to find records that have only words beginning with the specified letter. Also note that there is not a fulltext index for this table.
Using REGEXP opearator:
It returns records where column body contains words starting with a,c,g or i (case insensitive)
Be aware though: this is not a very good idea if you expect any heavy load (not using index – it scans every row!)