Specifies the minimum number of digits after the decimal point when an arithmetic result is truncated to the maximum precision.
UltraLite employs different methods for setting this property:
Context | Implemented by |
---|---|
From the command line Use any utility that creates a database. |
Use the following property syntax: - o scale=value |
From Sybase Central Use any wizard that creates a database. |
On the New Database Options page, set the Scale option. |
From a client application Use the create database method. |
Set this property as one of the creation parameters for an API's create database method on the database manager class. |
Integer, between 0 and 127, inclusive, and less than the value specified for the precision database option
6
You cannot change the scale of an existing database. Instead, you must create a new database.
The scale property specifies the minimum number of digits after the decimal point. Multiplication, division, addition, subtraction, and aggregate functions can all have results that exceed the maximum scale.
Use this property with the precision property, which is also used to determine the entire length of arithmetic results.
When a DECIMAL(8,2) is multiplied with a DECIMAL(9,2), the result could require a DECIMAL(17,4). If precision is 15, only 15 digits are kept in the result. If scale is 4, the result is DECIMAL(15,4). If scale is 2, the result is a DECIMAL(15,2). In both cases, there is a possibility of overflow.