Rules and Restrictions for Modifying NUMBER Columns - Advanced SQL Engine - Teradata Database

SQL Data Definition Language Detailed Topics

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2021-07-27
dita:mapPath
imq1591724555718.ditamap
dita:ditavalPath
imq1591724555718.ditaval
dita:id
B035-1184
lifecycle
previous
Product Category
Teradata Vantage™

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.