Reputation: 411
How can I delete the data from database(all tables) older than two years? I am using SQL server 2000. Please advise. I am not sure about foreign constraints.
Upvotes: 1
Views: 1481
Reputation: 1615
You need some timestamp, based on which you can delete records. Then you can use Scheduled Tasks to fire queries which delete old data.
Upvotes: 0
Reputation: 309008
You'll have to delete records in a certain order if there are foreign key constraints. You have to delete the "many" records that refer to "one" before you can delete "one".
It'll be a multi-step process:
Upvotes: 3