CS 100 Databases
Unit 2: Manipulating the Data in a Database
Lesson 5: Creating a Database Query
How you specify sort order and selection criteria in a query?
The bottom portion of the query design grid has rows for specifying sort order and selection criteria:
The following animation demonstrates how to specify sort order and selection criteria.
|
|
Notice in the above animation that when two values appear on the same row only records that meet both criteria are selected. For example, in the first query in the above animation, =Hard and >300 were specified on the same row, so only books with hard covers and with more than 300 pages were shown. When >300 was moved to the next line, books with hard covers or with more than 300 pages were shown.
The example above shows two operators, equal to (=) and greater than (>). There are many more operators and expressions you can use. For more information, see the Help topic "Examples of criteria expressions for queries or filters."
Copyright 1997-2004 by the Curators of the University of Missouri |