Q

All about data purging

What is data purging? What technology or method can I use to purge data in SQL Server 2000?

What is data purging? What technology or method can I use to purge data in SQL Server 2000?
Data purging is deleting data that you no longer want. In SQL Server 2000, or in fact in any database system, the very first step is to make sure you have a copy of it, because you might want to restore it some day.

There are many ways to make sure you have a copy of your data. For example, you can back up the entire database....

Or you could take a copy of only those rows about to be purged. In SQL Server, you have the very handy SELECT INTO FROM syntax:

select *
  into old_accounts_2003
  from current_accounts
 where account_lastactive < '2004-01-01'
Once that's done, you can go ahead and delete:
delete
  from current_accounts
 where account_lastactive < '2004-01-01'
Remember, always make sure you can restore it before you purge it.
This was last published in July 2005

Dig Deeper on Microsoft SQL Server 2000

PRO+

Content

Find more PRO+ content and other member only offers, here.

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchBusinessAnalytics

SearchDataCenter

SearchDataManagement

SearchAWS

SearchOracle

SearchContentManagement

SearchWindowsServer

Close