首页 > 数据库技术 > 详细

oracle trim函数

时间:2014-09-02 20:03:15      阅读:511      评论:0      收藏:0      [点我收藏+]

本文参考http://blog.csdn.net/indexman/article/details/7748766


bubuko.com,布布扣

语法描述如下:

TRIM([ { { LEADING | TRAILING | BOTH }
         [ trim_character ]
       | trim_character
       }       FROM 
     ]
     trim_source
    )

    参数解释:

    leading   开头字符

    trailing    结尾字符

    both        开头和结尾字符

    trim_character  去除的字符

    trim_source      修剪源

select trim(leading ‘x‘ from ‘xhellox‘) from dual;--hellox
select trim(trailing ‘x‘ from ‘xhellox‘) from dual;--xhello
select trim(both ‘x‘ from ‘xhellox‘) from dual;--hello
select trim(‘x‘ from ‘xhellox‘) from dual;--hello
select trim(‘ xhellox ‘) from dual;--xhellox
select trim(trailing  from ‘xhellox ‘) from dual;--xhellox
select trim(trailing ‘x‘ from null) from dual;--empty
select trim(trailing null from ‘xhellox‘) from dual;--empty





oracle trim函数

原文:http://my.oschina.net/u/617909/blog/309310

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!