表: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>
谢谢!!!

解决方案 »

  1.   

    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>','');
      

  2.   

    非常感激楼上热心大侠的帮助,
    可是怎么执行了之后<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>这些依然还存在啊?
      

  3.   

       建议你列出你的表结构,并提供测试数据以及基于这些测试数据的所对应正确结果。
       参考一下这个贴子的提问方式http://topic.csdn.net/u/20091130/20/8343ee6a-417c-4c2d-9415-fa46604a00cf.html
       
       1. 你的 create table xxx .. 语句
       2. 你的 insert into xxx ... 语句
       3. 结果是什么样,(并给以简单的算法描述)
       4. 你用的数据库名称和版本(经常有人在MS SQL server版问 MySQL)
       
       这样想帮你的人可以直接搭建和你相同的环境,并在给出方案前进行测试,避免文字描述理解上的误差。   
      

  4.   


    mysql> select replace('123<p style=\"text-align: center\"><an style=\"color: #ff
    6600\"><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>'
        ->
        -> ,'<p style=\"text-align: center\"><an style=\"color: #ff6600\"><strong>[
    目前杭州玛丽亚医院妇科医院有一系列的优惠活动,凭预约号可直接减免一定的费用。]</s
    trong></an></p>\r\n<p style=\"text-align: center\"><an style=\"color: #ff6600\">
    <strong><an style=\"color: #ff0000\">>>点击获取预约号<<</an>  <strong><font co
    lor=\"#1f3a87\">>>点击查看公交车路线<<</font></strong></strong></an></p>\r\n<p s
    tyle=\"text-align: center\">杭州玛丽亚医院的地址在:杭州市文三路6541号</p>'
        ->
        -> ,'')
        -> ;
    +-------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    -------------------+
    | replace('123<p style=\"text-align: center\"><an style=\"color: #ff6600\"><stro
    ng>[ 目前杭州玛丽亚医院妇科医院有一系列的优惠活动,凭预约号可直接减免一定的费用
    。]</strong></an></p>\r\n<p style=\"text-align: center\"><an style=\"color: #ff6
    600\"><strong><an s                                                        |
    +-------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    -------------------+
    | 123
                       |
    +-------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    -------------------+
    1 row in set (0.00 sec)mysql>
    我在这个字符串前面加个123,然后替换空后,得到的是123。
    检查下你的代码。
      

  5.   


    zuoxingyu

    难道是我代码的问题吗?
      

  6.   

    检查代码和字符集设置。http://blog.csdn.net/ACMAIN_CHM/archive/2009/05/12/4174186.aspx
    MySQL 中文显示乱码