I’ve a table which has data something like below. I want to get rows which contains in category column ‘2’? How shold I set the query? I need that for update the row. The category column has ‘text’ type.
id category
-------------------
13 -1-,
14 -2-,
15 -1-,-2-,-3-,-4-,
16 -2-,-4-,
After update the data should be like that:
id category
-------------------
13 -1-,
14 -5-,
15 -1-,-5-,-3-,-4-,
16 -5-,-4-,
Select those categories like this:
But your example looks like you want to replace
2with5. It can be done like this:That way you need no
whereclause.