What is the size of Number data type in Oracle PL\SQL with out precision and scale suplied?
<p>One of the guidelines in my new project is to specify precision &amp; scale along with the NUMBER in Oracle PL\SQL. The developer handbook says if this is not specified a default size of 22 bytes is allocated for every variable.</p>
<p>While I understand it is important to specify precision &amp; scale where ever possible. I don't seem to agree that 22 bytes are allocated if the precision is not supplied.</p>
<p><a href="http://docs.oracle.com/cd/B28359_01/server.111/b28318/datatype.htm#CNCPT1834" rel="nofollow noreferrer">http://docs.oracle.com/cd/B28359_01/server.111/b28318/datatype.htm#CNCPT1834</a></p>
<p>From the Oracle documentations:</p>
<p>&quot;<strong>Internal Numeric Format</strong></p>
<p>Oracle Database stores numeric data in variable-length format. Each value is stored in scientific notation, with 1 byte used to store the exponent and up to 20 bytes to store the mantissa. The resulting value is limited to 38 digits of precision. Oracle Database does not store leading and trailing zeros.<br>
For example, the number 412 is stored in a format similar to 4.12 x 10<sup>2</sup>, with 1 byte used to store the exponent(2) and 2 bytes used to store the three significant digits of the mantissa(4,1,2). Negative numbers include the sign in their length.&quot;</p>
<p>I sent the above documentation to the database architect, but he doesn't seem to agree with me.</p>
<p>If we don't specify precision &amp; scale for a NUMBER datatype in oracle pl\sql will it take 22 bytes or just enough bytes to store the value assigned to it?</p>