![]() Getting to know delete queries
Delete queries remove selected records from an existing table. They are most
helpful when you use them to trim out records you no longer need in the
table. Figure 2-8 shows an example of a delete query that reverses the effect
of the append query shown in Figure 2-7. In this case, I decided that I didn’t
want to include the Auction 36 items in Auction 35 after all.
Figure 2-7:
You use an
append
query to add
records to
an existing
table.
32
Part I: Accessing Both Ends: Getting Data In and Info Out
Backing up your records just in case
If you’re nervous about the permanence of the
delete query, you might want to create a make-
table query that uses the same criteria you
intend to use for your delete query. Run the
make-table query before you run your delete
query. By doing so, you create a copy of the
records that you’re going to delete so that you
can restore those records in case you later real-
ize that you messed up in deleting the records
and needed them all along.
You may also want to back up (or archive) the
entire database file after you’ve made a backup
table of the records you’re deleting from the
main table. Be sure to give your database file
backup copy a different name so that you don’t
accidentally open it in the future instead of
opening your working copy.
06_599658 ch02.qxd 8/31/05 12:43 PM Page 32
|
|