zoukankan      html  css  js  c++  java
  • sql 中的回车和换行问题

    --移除回车符

    update master_location
    SET street_number = REPLACE(street_number, CHAR(13), '')

    --移除换行符

    update master_location
    SET street_number = REPLACE(street_number, CHAR(10), '')

    --查询的时候,可能会出现单独使用char(10)  或者char(13)并不管用

    如 : select  REPLACE(Address,char(13),'')  as Address  from 表

     select  REPLACE(Address,char(10),'')  as Address  from 表

    其实这样就可以解决了

     select  REPLACE( REPLACE(Address,char(13),''),char(10),'')  as Address  from 表

    就是 char(10) 和char(13) 联合使用

  • 相关阅读:
    Aizu
    Aizu
    POJ
    POJ
    POJ
    UVA
    manacher
    Gym
    Gym
    Gym
  • 原文地址:https://www.cnblogs.com/yangjinwang/p/4597296.html
Copyright © 2011-2022 走看看