Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The first number is precision the second number is scale. The equivalent in SQL Server can be as Decimal / Numeric and you could define it like so:</p> <pre><code>DECLARE @MyDec decimal(18,2) </code></pre> <p>The 18 is the max total number of decimal digits that can be stored <strong>(that is the total number of digits, for instance 123.45 the precision here is 5, while the scale is 2)</strong>. The 2 is the scale and it specifies the max number of digits stored to the right of the decimal point.</p> <p>See <a href="http://msdn.microsoft.com/en-us/library/aa258832(v=SQL.80).aspx" rel="nofollow noreferrer">this article</a></p> <p>Just remember the more precision the more size in storage bytes. So keep it at a minimum if possible.</p> <blockquote> <p>p (precision)</p> <p>Specifies the maximum total number of decimal digits that can be stored, both to the left and to the right of the decimal point. The precision must be a value from 1 through the maximum precision. The maximum precision is 38. The default precision is 18.</p> <p>s (scale)</p> <p>Specifies the maximum number of decimal digits that can be stored to the right of the decimal point. Scale must be a value from 0 through p. Scale can be specified only if precision is specified. The default scale is 0; therefore, 0 &lt;= s &lt;= p. Maximum storage sizes vary, based on the precision.</p> </blockquote> <p>Finally, it is worth mentioning that in oracle you can define a scale greater then a precision, for instance Number(3, 10) is valid in oracle. SQL Server on the other hand requires that the precision >= scale. So if you defined Number(3,10) in oracle, it would map into sql as Number(10,10).</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload