0

I am working on a sql query where I have to set NULL, the query is like UPDATE tb_products SET region_ids = NULL WHERE region_ids = ?"; here regions_ids column is like, `regions_ids = 7,8,11 and if I getting value in parameter is 8 then the result would be 7,NULL,11.

https://i.stack.imgur.com/Jl4qn.png

or can i delete only specified value at any condition that the result may become 7,11 instead of 7,NULL,11? The type of region_ids column is "mediumtext utf8_general_ci" and the query for selecting data on basis of region_ids is SELECT * FROM `tb_products` WHERE `region_ids` LIKE '%7%' please help!!!

0 Answers0