Create a delete query (ADP)

Microsoft Office Access 2003

You can delete multiple rows in one operation by using a Delete query. When you create a Delete query, you specify the database table to delete rows from and the search condition to define the rows you want to delete.

Note  Deleting all rows from a table clears the data in the table but does not delete the table itself. You can delete tables using the Database Designer.

When you create a Delete query, the Grid pane changes to reflect the options available for deleting rows. Because you do not display data in a Delete query, the Output, Sort By, and Sort Order columns are removed. In addition, the check boxes next to the column names in the rectangle representing the table, view, or function are removed because you cannot specify individual columns to delete.

ShowCreate a delete query

  1. In the Database window, click Queries Button image under Objects, and then click New.
  2. In the New Query dialog box, select Design Stored Procedure.
  3. In the Add Table dialog box, add the tables, views, or functions you want to use in the delete query, and then click Close.
  4. On the Query menu click Delete Query.
  5. Enter search conditions to define the rows to be deleted. If you do not specify a search condition, all rows will be deleted.

    Note   Because you cannot delete the contents of individual columns, the check boxes in the rectangle representing the table, view, or function are removed when you start a Delete query. To add columns to the Grid pane to use in search conditions, drag them from the rectangle representing the table, view, or function to the Columns column, or select a data column in the Columns column.

When you execute the Delete query by using the Run Button image button on the Query Designer toolbar, a message appears indicating how many rows were deleted.