Status : 

  Won't Fix<br /><br />
		Due to several factors the product team decided to focus its efforts on other items.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 774012 Comments
Status Closed Workarounds
Type Suggestion Repros 0
Opened 12/11/2012 3:34:55 AM
Access Restriction Public


SQL Server should provide a statement that allows truncating a partition in a partitioned table. Currently, it is possible to truncate an entire table using TRUNCATE TABLE. There should be a command to do just that for a single partition.

Currently, one needs to create a a table with partition-aligned schema, switch out the partition and drop the table. This is tedious and error prone. TRUNCATE PARTITION should provide just that.
Sign in to post a comment.
Posted by Microsoft on 2/20/2013 at 11:31 AM

Hi, thanks for your feedback. As you note, there is a way to do this today by moving the partition to a second table through ALTER TABLE SWITCH and then truncating the second table. If both tables are part of the same filegroup, this should actually be a low-risk operation as no data is moved, we just update the metadata. We will consider making this easier in a future release but we won't be able to prioritize making this change at this time.