Modifying columns that have precision or scale

Before you modify a column’s scale, check the length of your data.

If an alter table command causes a column value to lose precision (for example, from numeric(10,5) to numeric(5,5)), Adaptive Server aborts the statement. If this statement is part of a batch, the batch is aborted if the arithabort arithignore arith_overflow option is turned on.

If an alter table command causes a column value to lose scale (say from numeric(10, 5) to numeric(10,3), the rows are truncated without warning. This occurs whether arithabort numeric_truncation is on or off.

If arithignore arith_overflow is on and alter table causes a numeric overflow, Adaptive Server issues a warning. However, if arithabort arithignore arith_overflow is off, Adaptive Server does not issue a warning if alter table causes a numeric overflow. By default, arithignore arith_overflow is off when you install Adaptive Server.

NoteMake sure you review the data truncation rules and fully understand their implications before issuing commands that may truncate the length of the columns in your production environment. First perform the commands on a set of test columns.