15.00 - Rules and Restrictions for Modifying NUMBER Columns - Teradata Database

Teradata Database SQL Data Definition Language Detailed Topics

prodname
Teradata Database
vrm_release
15.00
category
Programming Reference
featnum
B035-1184-015K

Rules and Restrictions for Modifying NUMBER Columns

The following rules and restrictions apply to modifying NUMBER columns in a table. These rules and restrictions apply to modifying the precision and scale of exact NUMBER columns with modifying their rows.

  • You can increase the precision of exact NUMBER columns.
  • You can increase both the precision and scale of exact NUMBER columns as long as you increase the precision by as much as you increase the scale.
  • You can change an exact NUMBER column to an approximate NUMBER column or approximate NUMBER column with scale as long as you do not decrease the scale.
  • You can change both an exact NUMBER column and an approximate NUMBER column with scale to an approximate NUMBER column without scale.
  • You cannot decrease the precision of an exact NUMBER column unless the table is not populated with rows.
  • You cannot decrease the scale of an exact NUMBER column unless the table is not populated with rows.
  • You cannot increase the scale of a NUMBER column unless you also increase its precision by at least as much.
  • You cannot modify an approximate NUMBER column to be either an exact NUMBER column or an approximate NUMBER column with scale.
  • You cannot modify an exact NUMBER column to be an approximate NUMBER column with a decrease in scale.