繁体
--returnsan
column
internaloracleformat,used
forgettinginfoabouta
--formatoptions:8=oc
tal,10=decimel,16=hex,17=characters
--returntype
codes:1=varchar2,2=n
umber,8=long,12=date,
--23=raw,
24=longraw,69=rowid,
96=char,106=mlbel
greatest(expr[,expr2[,expr3...]]
--returnsthrgestval
ueofallexpressions
least(expr[,expr2[,expr3...]]
--returnsthe
smallestvalueofallexpre
ssions
nvl(expr1,expr2
--ifexpr1isnotnull,i
tisreturned,otherwiseexpr2isreturned
sqlcode
--returnssqlerrorcode
query,
osterror.cannotbeuseddirectlyin
--valuemust
besettolocalvariablefir
st
sqlerrm
--returnssql
inquery,
errormessageosterror
.cannotbeuseddirectly
--valuemustbesettolo
calvariablefirst
uid
--returnstheuseridof
theuseryouareloggedonas
--usefulins
electinginformationfromlo
wlevelsystables
user
--returnsthe
usernameoftheuseryoua
reloggedonas
userenv(‘option‘)
--returnsinf
ormationabouttheuseryou
areloggedonas
--options:e
ntryid,sessionid,terminal,
nguagebel,osdba
--(
alloptionsnotavablein
alloracleversions)
vsize(expr)
--returnsthenumberofb
ytesusedbytheexpression
--usefulins
electinginformationaboutt
ablespacerequirements
*
*sqldatefunctions(dtreprese
*
ntsoracledateandtime)
*(functionsreturn
*
anoracledateunlessotherw
isespecified)
*
add_months(dt,num)
--addsnummonthsto
dt(numcanbenegative)
st_day(dt)
-stdayofmonthin
monthcontainingdt