update table1 set col1 = concat(col1,'asdfasdfadsfadfads');

解决方案 »

  1.   

    Mysql:使用concat方法,select concat(url1,url2,url3)  from table 
      

  2.   

    测试了OK,但是有个问题,我其他产品不需要添加的也添加上去了,只需要有
    <img style="width: 904px; height: 1012px;" src="http://www.jewellet.de/images/promotion/s100-8.gif" alt="">
    这行字符的后面添加,没有的就很不添加,有没有好的方法?
    感激
      

  3.   

    测试了OK,但是有个问题,我其他产品不需要添加的也添加上去了,只需要有
    <img style="width: 904px; height: 1012px;" src="http://www.jewellet.de/images/promotion/s100-8.gif" alt="">
    这行字符的后面添加,没有的就很不添加,有没有好的方法?
    感激使用like判断,sql如下:
    UPDATE tablename1 SET column1=CONCAT(column1,'aaaaaaaaaa ') WHERE id LIKE '%<img style="width: 904px; height: 1012px;" src="http://www.jewellet.de/images/promotion/s100-8.gif" alt="">%'
      

  4.   

    用%%无法使用到索引
    UPDATE ttt SET column1=CONCAT(column1,'aaaaaaaaaa ') WHERE id LIKE '%<img style="width: 904px; height: 1012px;" src="http://www.jewellet.de/images/promotion/s100-8.gif" alt="">%'
      

  5.   


    可以再添加另外一个字段datetime,利用datetime来建立索引,这样效率就会提升一些。