• Empty Tables (2000)

    Author
    Topic
    #433482

    Is there a way of emptying the table quickly, I basically want to flush all the data out and start a fresh?

    Viewing 1 reply thread
    Author
    Replies
    • #1019722

      Take hold of a corner of the table cloth, and pull sharply. grin

      You can create a delete query to delete all records in a table.
      If you want to remove the records from several tables, create a delete query for each. If you wish, you can create a VBA procedure or a macro that executes the delete queries.

      Note: if you have relationships with enforced referential integrity, you must take the following into consideration:
      – If you have specified Cascade Delete Related Records for a relationship, you don’t need a delete query for the table on the “many” side. When you delete records from the “one” side, the related records on the “many” side will automatically be deleted too.
      – If you have NOT specified Cascade Delete Related Records for a relationship, you must run the delete query for the table on the “many” side first, then the delete query for the table on the “one” side. The latter will fail if you try to run it first.

    • #1019739

      I just open the table from the database window, then hit Ctrl-A and the delete key. HansV’s comments about Cascaded Deletes apply to this method as well.

    Viewing 1 reply thread
    Reply To: Empty Tables (2000)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: