资源描述:
《oracle存储过程函数汇总()》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、oracle存储过程函数汇总()CharacterfunctionreturncharactervalueThesefunctionsallreceivedisthecharacterparametertypegroup(exceptCHR)andreturnsthecharactervalue・Inadditiontothespecialinstructions,thefunctionreturnsVARCHAR2mostnumericaltypes・Therestrictionsonthereturntypeofthecharacterfunctionar
2、ethesameasthoseforthebasicdatabasetype・Themaximumvalueofcharactervariablestorage:TheVARCHAR2valueislimitedto2000characters(ORACLE8to4000characters)TheCHARvalueislimitedto255characters(0RACLE82000)Thelongtypeis2GBTheClobtypeis4GB1,CHRSyntax:Chr(x)Function:returninthedatabasecharacter
3、setwithnumericalequivalencewiththecharacterofX.CHRandASCIIareapairofinversefunctions・AfterCHRconversioncharacterafterASCIIconversionandobtainedtheoriginalwordFu.Uselocation:processandSQLstatement・1,CONCATSyntax:CONCAT(stringl,string2)Thefunctionreturnsthestringl,andconnectedstring2b
4、ehind.Uselocation:processandSQLstatement・2,INITCAPSyntax:INITCAP(string)Function:returnsthefirstletterofeachwordinthestring,uppercase,andtheotherletterintheword,lowercasestring.Thewordisused・Spacesoralphanumericcharacterstoseparate.It'snotletterCharacterunchanged.Uselocation:process
5、andSQLstatement・3,LTRIMSyntax:LTRIM(stringl,string2)Deletefunction:returncountingfromtheleftappearsinthestring2characterinstringl.String2issettoasingleblankbydefault・Thedatabasewillscanstringl,startingfromtheleft.WhenWhenthefirstcharacterinstring2,theresultswillbereturned・LTRIM,sbeh
6、aviorisverysimilartothatofRTRIM.Uselocation:processandSQLstatement・1,NLS_INITCAPSyntax:NLS_INITCAP(stringt,nlsparams])Function:returnsthestring,thefirstletterofeachwordcapitalized,andtheotherwordsintheword,lowercasestring,nlsparamsThedifferentsequeneeisdifferentfromthedefaultvalueof
7、thespecifiedsession・Ifyoudonotspecifyaparameter,functionandthesameINITCAP・Nlsparamscanbeusedintheformof:'NLS_SORT二sort'Heresortmadeasequenceoflanguage・Uselocation:processandSQLstatement・Example:SelectNLSINITCAP(,ABCD,)fromdual;AbedAtSelectNLS_INITCAP('abed')fromdual;Abed1,NLS_LOWERS
8、yntax:NLS_LOWER(str