0

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

"gender:male,eye_color:blue,province:12"

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

Thanks in advance

3
  • there are 3 fields is your colmn name Commented Apr 18, 2016 at 3:47
  • select * from tablename where gender='male' AND province='12'; Commented Apr 18, 2016 at 3:49
  • @DarjiJigar column name? I'm talking about the content of a column, I don't specify a column name in the question Commented Apr 18, 2016 at 3:50

1 Answer 1

3

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%'
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.