16.20 - Rules and Restrictions for Modifying NUMBER Columns - Teradata Database - Teradata Vantage NewSQL Engine

Teradata Vantage™ SQL Data Definition Language Detailed Topics

Product
Teradata Database
Teradata Vantage NewSQL Engine
Release Number
16.20
Release Date
March 2019
Content Type
Programming Reference
Publication ID
B035-1184-162K
Language
English (United States)

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.