oletob oletob - 1 year ago 99
SQL Question

MYSQL Match string in column

I have a text inside a column and I want to make a search within this text but with only some words, for example:


How can I perform a query to match just "gender:male,province:12" in this text?

Thanks in advance

Answer Source

You mean this or not, just try it, I don't even know it works for your demand;)

select * from @table where @column like '%gender:male,%province:12%'
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download