cancel
Showing results for 
Search instead for 
Did you mean: 

add column to partitioned table -SAP ASE 16

jmtorres
Active Participant
0 Kudos

Good day,

-If we add a column on a partitioned table( range, hash,etc), and this new column is not part of the current partition schema, is it necessary to drop and recreate the partition?

-On the other hand if we need to add a column to a partitioned table that affects the current partition scheme, this one must be drop/recreated?

Thank you

Regards

Jose

former_member188958
Active Contributor
0 Kudos

Hi Jose,

It doesn't appear to be necessary:

1> create table fictionsales

(store_id int not null,

order_num int not null,

date datetime not null)

partition by range (date)

(q1 values <= ("3/31/2004"),

q2 values <= ("6/30/2004"),

q3 values <= ("9/30/2004") ,

q4 values <= ("12/31/2004") )

go

2> 3> 4> 5> 6> 7> 8> 9> 10> 1>

2> alter table fictionsales add foo int null

3> go

1>

Can you come up with an example where it does seem to be necessary?On your second question, can you give an example of where adding a column would affect the partition conditions?
View Entire Topic
jmtorres
Active Participant
0 Kudos

Thank you Bret!

I''ll try to get a couple of examples, but with yours, it seems that it shouldn't matter on the 1st case.

Regards

Jose