表:maliya_c_news 字段:content以下(代码)内容是content字段中其中一小部分内容我想把这段代码批量去掉(删除),并不是把content字段中的内容全部去掉需要去掉的内容如下: <p style=\"text-align: center\"><an style=\"color: #ff6600\"><strong>[ 目前杭州玛丽亚医院妇科医院有一系列的优惠活动,凭预约号可直接减免一定的费用。]</strong></an></p>\r\n<p style=\"text-align: center\"><an style=\"color: #ff6600\"><strong><an style=\"color: #ff0000\">>>点击获取预约号<<</an> <strong><font color=\"#1f3a87\">>>点击查看公交车路线<<</font></strong></strong></an></p>\r\n<p style=\"text-align: center\">杭州玛丽亚医院的地址在:杭州市文三路6541号</p>
谢谢
谢谢
UPDATE table SET field=REPLACE(field, 'abc', 'def');
UPDATE table SET field=REPLACE(field, 'abc', 'def');
field是你要替换的字段名!依你上面说的应该是
UPDATE maliya_c_news SET content=REPLACE(content, 'abc', 'def');
这段
‘def’换成''
UPDATE maliya_c_news SET content=REPLACE(content, '<p style=\"text-align: center\"><an style=\"color: #ff6600\"><strong>[ 目前杭州玛丽亚医院妇科医院有一系列的优惠活动,凭预约号可直接减免一定的费用。]</strong></an></p>\r\n<p style=\"text-align: center\"><an style=\"color: #ff6600\"><strong><an style=\"color: #ff0000\">>>点击获取预约号<<</an> <strong><font color=\"#1f3a87\">>>点击查看公交车路线<<</font></strong></strong></an></p>\r\n<p style=\"text-align: center\">杭州玛丽亚医院的地址在:杭州市文三路6541号</p>', '');可是真的不行呀