remove a paritition table

Posted on

Question :

I need to remove a partition table for an application upgrade. It is SQL Server 2008 R2.

The partition column is on column col1 data type smallint, null. Col1 has length 10 and precision 5. As you can see the partition column is not the primary key.

I have three partitions. Left boundary <=boundary 2, 5 and the last one is empty. All of the partitions are on primary file group. There are no other filegroups.

Answer :

@Kin yes he wants just to remove the partition so it becomes non- partitioned table.
as Aaron said I would select * into new_table from old_paritioned and rename the new table and drop the partitioned table.I am sure they are better ways of doing that though.
If it is large table(billion of rows) copying all rows takes time and resources.

Leave a Reply

Your email address will not be published.