常用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位字符

 

posted @ 2023-06-13 11:44  yuanyuanyang  阅读(1)  评论(0编辑  收藏  举报