资源描述:
《oracle常用功能函数汇总》由会员上传分享,免费在线阅读,更多相关内容在应用文档-天天文库。
1、oracle常用功能函数汇总***********************************************************SQLGroupFunctions(numcanbeacolumnorexpression) *(nullvaluesareignored,defaultbetweendistinctandallisall) *********************************************************AVG([distinctorall]num) --averagevalueCOUNT(distinct
2、orall]num) --numberofvaluesMAX([distinctorall]num) --maximumvalueMAX([distinctorall]num) --minimumvalueSTDDEV([distinctorall]num) --standarddeviationSUM([distinctorall]num) --sumofvaluesVARIANCE([distinctorall]num)--varianceofvalues **************************************************
3、*****MiscellaneaousFunctions: *******************************************************DECODE(expr,srch1,return1[,srch2,return2...],default] --ifnosearchmatchestheexpressionthenthedefaultisreturned, --otherwise,thefirstsearchthatmatcheswillcause --thecorrespondingre
4、turnvaluetobereturnedDUMP(column_name[,fmt[,start_pos[,length]]]) --returnsaninternaloracleformat,usedforgettinginfoaboutacolumn --formatoptions:8=octal,10=decimel,16=hex,17=characters --returntypecodes:1=varchar2,2=number,8=long,12=date, -- 23=raw,24=longraw,69=rowid,96=char,106=mls
5、labelGREATEST(expr[,expr2[,expr3...]] --returnsthelargestvalueofallexpressionsLEAST(expr[,expr2[,expr3...]] --returnsthesmallestvalueofallexpressionsNVL(expr1,expr2 --ifexpr1isnotnull,itisreturned,otherwiseexpr2isreturnedSQLCODE --returnssqlerrorcodeoflasterror. Cannotbeuseddirectlyi
6、nquery, --valuemustbesettolocalvariablefirstSQLERRM --returnssqlerrormessageoflasterror. Cannotbeuseddirectlyinquery, --valuemustbesettolocalvariablefirstUID --returnstheuseridoftheuseryouareloggedonas --usefulinselectinginformationfromlowlevelsystablesUSER --returnstheusername
7、oftheuseryouareloggedonasUSERENV('option') --returnsinformationabouttheuseryouareloggedonas --options:ENTRYID,SESSIONID,TERMINAL,LANGUAGE,LABEL,OSDBA -- (alloptionsnotavailableinallOracleversions)VSIZE(