Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 05 Jan 2011 @ 10:56:31 GMT


     
  <Prev Next>   <<First <Prev
Next>
Last>>
 


Subj:   Re: Alter the column without dropping the table and column
 
From:   Dieter Noeth

Laxmi Kantha K wrote:

  can you let me know wheether we can alter table from decimal (9,2) to decimal (15,2) without dropiing the table and recreating. If so pls send the syntax for alter table.  


Decimals are stored as scaled integers:

1..2 digits: 1 byte

3..4 digits: 2 bytes

5..9 digits: 4 bytes

10..18 digits: 8 bytes

19..38 digits: 16 bytes


You can change the definition of a decimal only if:

1. the number of fractional digits doesn't change

2. the number digits increases

3. the internal storage size doesn't change


Changing dec(9,2) to dec(15,2) breaks #3, thus you can't do it.


Dieter



     
  <Prev Next>   <<First <Prev
Next>
Last>>
 
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023