GKG4
GKG4

Reputation: 501

LIKE search on TEXT datatype

I tried searching in questions, but unable to find.

I need to run MYSQL LIKE statement on a column whose datatype is TEXT I am unable to do so, can anyone provide me sample query on it ?

tblTable Structure
===============
id int primary key
Subject Text

Now query is select * from tblTable where Subject Like '%ABC%'

Its not working, any help ?

Upvotes: 0

Views: 476

Answers (1)

Girish Kumar Sinha
Girish Kumar Sinha

Reputation: 832

Try this:

SELECT * FROM `tblTable ` WHERE MATCH(Subject) AGAINST('ABC' IN BOOLEAN MODE)

I think this will work for you

Upvotes: 1

Related Questions