14 min read
What Is a Query?
A query is a saved question you ask your database — built dynamically from the current data every time it runs, rather than a separately stored copy.
You will learn: that a query is a saved question, not a copy of the table. You will do: see how a filter on Members works. compare stored data to a query result.
Query = Saved Question
A query is a database object in RiversideLibrary.accdb. It holds instructions: which table to read, which rows to keep, which columns to show.
When you Run the query, Access reads the current table and shows a result. The result looks like a table grid. It is not a second copy of the data.
Query vs copy
| Copy rows to a new table | Save a query |
|---|---|
| Data goes stale when a member moves city | Each run reads live Members data |
| Two lists to maintain | One Members table; the query asks again |
SOURCE DATA
| Members | |||
|---|---|---|---|
Example Question
Staff ask: *Who lives in London?*
A query filters City = "London". Other members stay in Members — they are just hidden from this answer.
RESULT
| Result: LondonMembers query | ||
|---|---|---|
Practice
Swipe or use the arrows to move between questions.
1 / 2
Field Notes: A Question, Not a Copy
Running a query displays its answer as a datasheet that looks much like a table, but built dynamically from your underlying data every time it runs. The most common type by far is the Select Query, which simply retrieves and displays data matching your conditions, without changing anything. Action Queries — covered later in this part — are a different category that actually update, add, or delete data.
More lessons in Microsoft Access · Next: Building a Select Query in Design View · Previous: Normalization: Designing a Database That Won't Break
