When you draw a dataset as a layer, you often only want to draw some of the features. In these situations, you can define a query expression to select a subset of features for the layer to display. This is referred to as a definition query.
For example, you might want to do the following:
- Display only cities with a population above a certain threshold.
- Define map layers for each class of roads independent of the other features.
- Work with only a subset of data from a large enterprise database.
Create a new definition query
- Select a layer in the Contents pane.
On the Data tab, in the Definition Query group, click Definition Query .
The Layer Properties dialog box appears with the Definition Query tab selected.
- Click the Add Clause button to add the new definition query to the list of definition queries of the layer.
- Provide a query expression. See Build an SQL query expression for more information on how to build valid queries.
- Click Add to add the clause.
- Click OK.
After you set the definition query, the map is redrawn and displays the subset of features selected using your query. The layer continues to be drawn with this feature subset each time the map is refreshed.
To add all the features back to the layer, change the definition query to <none> in the Definition Query group drop-down list.