purging an sqlserver 7 database

  • Hello

    Am new to sql server 7 and perhaps my question is a basic one

    I save my database and i want to purge it. I want to know how to do that.

    thanks for helping me

  • By purging, do you mean you want to remove all the data, or that you wish to delete the database completely?

    If you want to delete it, just right click within Enterprise Manager, and select "delete".

    If you are wanting to remove all the data, you will need to issue a "TRUNCATE" statement on each of the tables, keeping in mind primary/foreign key relationships.  If you are going to be doing this regularly, I would suggest that when you get all the data out, take a backup.  Then, in the future, when you wish to clear it out, just restore that backup.

    Steve

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply