常用sql语句备忘录,不定时更新
1 update tab_users set PhoneNum=REPLACE(PhoneNum,CHAR(13),'')--去除回车符 2 update tab_users set PhoneNum=REPLACE(PhoneNum,CHAR(10),'')--去除换行符 3 update tab_users set PhoneNum=REPLACE(PhoneNum,CHAR(9),'')--去除tab制表符 4 update tab_users set PhoneNum=REPLACE(PhoneNum,' ','')--去除空格
字符串处理
select substring(name,1,len(name)-6) from tab_users--去除字段右边6位字符