Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个名为 products 的表,其中有一个名为 products_description 的字段,我如何从字段中删除某些文本,例如如果文本 abc 存在然后从所有产品中删除它?
谢谢
运行查询
select * from products where products_description like '%abc%'
并为每个结果做
new_description = str_replace('abc','',old_description);
并使用新描述运行更新查询。