Rules and Restrictions for Modifying NUMBER Columns - Analytics Database - Teradata Vantage

SQL Data Definition Language Detailed Topics

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
ft:locale
en-US
ft:lastEdition
2024-12-13
dita:mapPath
vuk1628111288877.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
jbg1472252759029
lifecycle
latest
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.