入门基础:认识OracleSQL内置函数(4)
文章作者 100test 发表时间 2007:03:14 13:56:12
来源 100Test.Com百考试题网
12.replace( string , s1 , s2 )
string 希望被替换的字符或变量
s1 被替换的字符串
s2 要替换的字符串
sql> 0select replace( he love you , he , i ) from dual.
replace( heloveyou , he , i )
------------------------------
i love you
13.soundex
返回一个与给定的字符串读音相同的字符串
sql> create table table1(xm varchar(8)).
sql> insert into table1 values( weather ).
sql> insert into table1 values( wether ).
sql> insert into table1 values( gao ).
sql> 0select xm from table1 where soundex(xm)=soundex( weather ).
xm
--------
weather
wether
14.trim( s from string )
leading 剪掉前面的字符
trailing 剪掉后面的字符
如果不指定,默认为空格符