zoukankan      html  css  js  c++  java
  • Sql批量替换字段字符,Sql批量替换多字段字符,Sql替换字符

    update phome_ecms_news_check set filename= replace(filename,'Under4-','');

    update phome_ecms_news_check set title= replace(title,'Under4 ','');

    update phome_ecms_news_check set keyboard= replace(keyboard,'Under4','');

    update phome_ecms_news_check set smalltext= replace(smalltext,'Underr4','');

    update phome_ecms_news_check_data set newstext= replace(newstext,'Under','');

    update phome_ecms_news_check set title= replace(filename,'supply','xxx');
    update phome_ecms_news_check set title= replace(filename,'Supply','xxx');

    update phome_ecms_news_check_data set newstext= replace(newstext,'supply','');
    update phome_ecms_news_check_data set newstext= replace(newstext,'Supply','');

    方法一:

    update 表名 set 字段名=replace(cast(与前面一样的字段名 as varchar(8000)) ,'原本内容','想要替换成什么')

    方法二:

    update [表名] set 字段名 = replace(与前面一样的字段名,'原本内容','想要替换成什么')

    update [表名] set 字段名 = replace(与前面一样的字段名,'原本内容','想要替换成什么')

     

  • 相关阅读:
    把本地的jar包安装到maven库中
    mybatis 查询
    freemarker
    python——线程相关
    【python-sql】sql操作时遇到的坑
    专项测试——移动app安装包检测
    【Android端 adb相关】adb相关总结
    for 语句
    Python2.x与3​​.x版本区别
    Python 运算符
  • 原文地址:https://www.cnblogs.com/yuesha/p/14696312.html
Copyright © 2011-2022 走看看