Previous Topic Next topic Print topic


Creating a DELETE Statement

The easiest way to delete individual records is to run a query and switch to ALLOW EDIT mode. However, if you want to perform a batch delete, you can use the WHERE condition generated for a query as the WHERE condition for a DELETE statement.

To convert a SELECT command to a DELETE command:

  1. Create a query that retrieves the rows that you want to delete. You may want to test the query to make certain it retrieves the correct rows. You should also save the query before proceeding if you want to access it again in the Query Design window. You must include at least one column in this query.
  2. Switch to SQL view.
  3. Block the SELECT clause and click the DEL key to delete it.
  4. In place of the SELECT clause, type the keyword DELETE.
  5. Run or save the SQL statement from the SQL Edit window.
Previous Topic Next topic Print topic