当前位置:数据库 > Oracle >>

oracle中trim函数和replace函数的用法


oracle中trim函数和replace函数的用法
 
For example:
trim('   tech   ')  would return 'tech'
trim(' '  from  '   tech   ')  would return 'tech'
trim(leading '0' from '000123')  would return '123'
trim(trailing '1' from 'Tech1')  would return 'Tech'
trim(both '1' from '123Tech111')  would return '23Tech'
 
--chr(10)是换行符,
 
    --chr(13)是回车,
 
    --replace(replace(tableSource,CHR(10),''),chr(13),'');
Oracle
MySQL
Access
SQLServer
DB2
Excel
SQLite
SYBASE
Postgres
如果你遇到数据库难题:
请访问www.zzzyk.com 试试
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,