去除tab空格 sql

去除tab空格 sql,第1张

MySQL将栏位里的tab字元清除

MySQL里的Tab字元为 \t使用以下SQL即可将将栏位里的tab字元清除update `scott` set `AA`=replace(`AA`,'\t','') WHERE `AA` like '%\t%

去掉隐藏的换行符。

update tb1 set test1= replace(test1 ,'\n\r','')

update tb1 set test1= replace(test1 ,'\n','')

update tb1 set test1= replace(test1 ,'\r','')

select * from phone where phonenumber regexp '[[:digit:]]$'

试试看

抱歉,题目没看清楚。。

刚查了下mysql的正则表达式文档,不支持back reference,所以我只能想到用最笨的方法做

select *

from phone where

substring(phonenumber,-1,1) = substring(phonenumber,-2,1) and substring(phonenumber,-3,1) = substring(phonenumber,-4,1) and substring(phonenumber,-1,1) = substring(phonenumber,-4,1)

postgresql数据库的正则支持back reference。。


欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/zaji/6100630.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-03-14
下一篇 2023-03-14

发表评论

登录后才能评论

评论列表(0条)

保存