Oracle 中的Interger类型
引自 wolfAone, oracle有没有integer类型,这种类型的最大值是多少啊.
Integer是Number类型的子类型:
NUMBERType
YouusetheNUMBERdatatypetostorefixedorfloatingpointnumbers
ofvirtuallyanysize.Youcanspecifyprecision,whichisthetotal
numberofdigits,andscale,whichdetermineswhereroundingoccurs.
Thesyntaxfollows:
NUMBER[(precision,scale)]
Youcannotuseconstantsorvariablestospecifyprecisionandscale;
youmustuseintegerliterals.ThemaximumprecisionofaNUMBERvalue
is38;themagnituderangeis1.0E-129..9.99E125.Ifyoudonot
specifytheprecision,itdefaultstothemaximumvaluesupportedby
yoursystem.
Scalecanrangefrom-84to127.Forinstance,ascaleof2roundsto
thenearesthundredth(3.456becomes3.46).Scalecanbenegative,
whichcausesroundingtotheleftofthedecimalpoint.Forexample,
ascaleof-3roundstothenearestthousand(3456becomes3000).A
scaleofzeroroundstothenearestwholenumber.Ifyoudonotspecify
thescale,itdefaultstozero.
TheNUMBERsubtypesbelowhavethesamerangeofvaluesastheirbase
type.Forexample,FLOATisjustanothernameforNUMBER.
DEC
DECIMAL
DOUBLEPRECISION
FLOAT
INTEGER
INT
NUMERIC
REAL
SMALLINT
Youcanusethesesubtypesforcompatibilityorwhenyouwantan
identifiermoredescriptivethanNUMBER.