I am using ArcGIS 10.2 and have assumed until now that it is possible to select a specific row in an attribute table. However, I can't seem to find a way to do this. The only available methods seem to be to return a search or update cursor, and to iterate through each row in the table.

Is there really no way to select only the desired row?

What I am trying to do is to select a target row - e.g. 50423 - and then to update a field for that row. I'd hate to iterate through the entire table of millions of records.

closed as off-topic by PolyGeo Jun 15 '18 at 0:23

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "When seeking help to debug/write/improve code always provide the desired behavior, a specific problem/error and the shortest code (as formatted text, not pictures) needed to reproduce it in the question body. Providing a clear problem statement and a code attempt helps others to help you." – PolyGeo
If this question can be reworded to fit the rules in the help center, please edit the question.


In arcpy, When you implement the Search Cursor or Update Cursor you have the option of using the where_clause parameter, which will allow you to select a specific row based on a field value (e.g. row ID).

This help file will show you how to build an appropriate SQL query for selecting a specific row.

Not the answer you're looking for? Browse other questions tagged or ask your own question.