I'm looking into horizontal partitioning for a table that has time-series data in it. I've discovered that partitioning is much easier in 2005 than it was in 2000 but I can't seem to find this answer:
Can I add/drop columns of a partitioned table?
Are special steps required because it's partitioned?
2条答案
按热度按时间31moq8wy1#
In addition to performing SWITCH operations that involve partitioned tables, ALTER TABLE can be used to change the state of the columns, constraints, and triggers of a partitioned table just like it is used for nonpartitioned tables. However, this statement cannot be used to change the way the table itself is partitioned. To repartition a partitioned table, use ALTER PARTITION SCHEME and ALTER PARTITION FUNCTION. Additionally, you cannot change the data type of a column of a partitioned table.
Read more here: http://technet.microsoft.com/en-us/library/ms190273.aspx
unguejic2#
I couldn't find a definitive answer (I found the doc @E.J. Brennan referenced to be a little dense and unclear). So I added to this example and have tested that, yes, you can add/drop columns: