You can select features in a map or scene interactively, or you can select them based on their attribution. When you select by attribution, you choose the selection method and write an expression to select an exact subset of features.
To select a subset of features in a map or scene by writing an expression, use the Select By Attributes button to open the Select Layer By Attribute geoprocessing tool. Use the tool to form an SQL query to select features matching a selection criteria from a layer or a table.
Follow these steps to create a selection set of features from a layer or a table:
- In a map or scene, on the Map tab, in the Selection group, click Select By Attributes to open the Select Layer By Attribute geoprocessing tool.
Alternatively, in a table, under View, or under Table for a stand-alone table, in the Selection group, click Select By Attributes . The tool can also be found at the top of the table view.
- On the Select Layer By Attribute tool dialog box, for the Input Rows parameter, choose the layer or table from which to select.
- For the Selection type parameter, choose how the selection is applied and what to do if a selection already exists in the view.
- Enter a query expression using one of the following methods:
- Choose values from the drop-down menus to construct the where clause. These menus and their values are specific to the underlying source data. Optionally, click Add Clause to add another clause to the query. Click the Verify button to validate the expression.
- Click the SQL toggle button to open a window where you can type an SQL expression directly. Click the Verify button to validate the expression.
- Click Load to load an existing query saved as a file.
- Optionally, check Invert Where Clause to select the inverse of the results of the expression formed in the previous step.
- Click OK to run the selection query and work with the selection results.
To zoom to your selection, click the results count at the bottom of the view.