Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Truncate (table partitions)

Author  Topic 

sqlfresher2k7
Aged Yak Warrior

623 Posts

Posted - 2011-10-24 : 16:03:28
I have created 4 partition table and now i want to truncate one of the partition table which has old data.

How do i achieve with scripts.

robvolk
Most Valuable Yak

15732 Posts

Posted - 2011-10-24 : 16:12:44
Actually that's called partition switching, it's done via the ALTER TABLE command, more details are here:

http://msdn.microsoft.com/en-us/library/ms190273.aspx
http://msdn.microsoft.com/en-us/library/ms191160.aspx
Go to Top of Page

sqlfresher2k7
Aged Yak Warrior

623 Posts

Posted - 2011-10-24 : 16:18:46
Thanks a lot !
Go to Top of Page
   

- Advertisement -