A query retrieves data from an Access database. Even though queries for Microsoft Access are written in Structured Query Language, it is not necessary to know SQL to create an Access query. The Query by Example screen allows users to run queries by picking tables and fields from a list.
A common Access query is the Select Query. A Select Query pulls data from one or more tables in the database, and it displays the result for the user. Records in the database are not edited with a Select Query but are only displayed. For example, a Select Query is used to pull records from a database for customers who live in a specific zip code. This data is then displayed on the screen or in a report. Other common Access queries are Update Queries, which change information in existing records; Append Queries, which combine data from multiple tables or queries; Delete Queries, which delete records; and Make Table Queries, which create additional tables in a database.
After a query is created in Access, it is either displayed or run. A query displays in the Datasheet View. The Datasheet View allows users to see the results of the query before any changes are made. Once a query runs, data may be deleted or changed. In Access, a message window appears when data is about to be changed or deleted. This allows the user to terminate the query if necessary.