中专门对字符数据进行处理r
r
在ORACLE数据库中有一张虚表dualr
该虚表中没有任何记录r
r
转大写upper值或者字段名r
selectuppere
amee
amefromempr
selectupperabcvalfromdualr
r
转小写lower值或者字段名r
selectlowere
amee
amefromempr
selectlowerABCvalfromdualr
r
首字母大写r
selecti
itcapabcfromdualr
selecti
itcape
amee
amefromempr
r
r
计算字符串长度r
selectle
gthe
amee
amele
gthfromempr
selectle
gthabcvalle
gthfromdualr
r
连接字符串r
selectco
catemp
oe
ameco
catresultfromempr
selectco
catabcdeffromdualr
r
r
截取子字符串substr字符串从哪位开始截取截取几位r
“从哪位开始截取”可以取正也可以取负r
取正表示从左边开始数,取负表示从右边开始数r
selectsubstrabc21fromdualr
r
注意:截取的时候总是从左边向右边截取ttr
r
r
r