-
Step 1
Open an existing Microsoft Access database with at least one existing table. Access queries by clicking "Queries" in the main database window.
-
Step 2
Open or create a new query. Open a query by highlighting the desired query and pressing "Design." Note that the query should already be a delete query or one that you wish to change to a delete query.
Create a new query by choosing "Create a new query in design view." A blank query design window will open. Choose at least one table from the table list to select fields from. -
Step 3
Press the "Query Type" button on the query toolbar and select "Delete" to create a basic delete query. This is required if you want the correct clauses in place in SQL View. Choose any fields you want in your delete query as well for further assistance once you switch views.
-
Step 4
Press the "View" button on the query toolbar. Use the drop-down arrow beside the button to select "SQL View."
-
Step 5
Begin your delete query with the clause "DELETE". Type the fields you wish to delete, separated by commas, on the same line. Use the format TableName.FieldName. Press "Enter" and type the clause "FROM". Type the table name you wish to select the field names from. End the "FROM" line with a semicolon.
For instance, a simple SQL Delete query would be typed as follows:
DELETE SampleTable.FirstField, SampleTable.SecondField
FROM SampleTable; -
Step 6
Add any desired criteria such as a number value or specific text by using the term "WHERE" plus your criteria within parentheses.
For instance, the SQL Delete query would now look like the following:
DELETE SampleTable.FirstField, SampleTable.SecondField
FROM SampleTable
WHERE (SampleTable.FirstField = "ThisText");
Note that the semicolon is now at the end of the last line of the query. Semicolons are used to denote the end of the query and will only appear at the end of your last line.







