--去除空白符
select regexp_replace(' a s d
', E'\\s+', ' ', 'g')
--去除首空格
select regexp_replace(' a b d ',E'(^\\s*)','','g')
--去除尾空格
select regexp_replace(' a b d ',E'(\\s*$)','','g')
--去除首尾空格
select regexp_replace(' a b d ',E'(^\\s*)|(\\s*$)','','g')
--去除首尾空格的函数
select trim(' a b d ')
postgresql去掉字符串空白符以及首尾空格
最新推荐文章于 2025-02-28 17:05:30 发布