ArcGIS Desktop

  • Documentation
  • Support

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS for Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

Help

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • More...

Fundamentals of ObjectID fields

The ObjectID field is maintained by ArcGIS and guarantees a unique ID for each row in a table. When you look at a table or a layer's attribute table, you will usually see the ObjectID field listed under the aliases of OID or ObjectID. Key functions, such as scrolling and displaying selection sets, depend on the presence of this field.

Most data sources supported by ArcCatalog and ArcMap provide an ObjectID field with their tabular data. In these cases, the ObjectID field is accessed directly and used by the Table window in ArcMap and table preview in ArcCatalog. The following data sources, however, do not contain an ObjectID field with their tabular data:

  • OLE DB data
  • Delimited text file data
  • Microsoft Excel data
  • Nonspatial data from SDE 3 (Note: Spatial data has an ObjectID field.)
  • Unregistered nonspatial data from ArcSDE (Note: Unregistered spatial data has an ObjectID field.)
  • Unregistered data from a personal geodatabase
Tip:
ObjectID fields are sequential and start with the number 1 for geodatabase data. For shapefiles and dBASE tables, the OID or FID column begins at 0.

If you are unsure what type of table you're working with and whether it has an ObjectID field, you can quickly find out. In ArcMap, on the top of the table of contents window click the List By Source button List By Source, right-click the table in the table of contents, then click Properties. Click the Source tab on the Table Properties dialog box and look for either a Yes or No for the Has Object-ID Field entry. In ArcMap or ArcCatalog, you can open the table's Properties dialog box and click the Fields tab. If there is no field listed with an ObjectID data type, the data does not have an ObjectID field.

If your table lacks an ObjectID field, you won't be able to perform the following operations:

  • Select the features in the layer on the map. Although you can select records in the Table window, including selecting using an expression on Select By Attributes, this selection set is not reflected on the map.
  • Apply a definition query to display only a subset of records or features.
  • Create relates. You can relate to a table without an ObjectID field from a table with an ObjectID field, however. In this case, the relate can be used by the Identify tool to list related records. You can't push selections via the relate.
  • Start an edit session and edit the attributes. However, you can edit the table the layer is based on directly on disk, such as in a text editor if the file is a .txt file. Your changes will then be reflected on the map the next time you refresh the map.

There are several ways of obtaining an ObjectID field for your data:

  • If you are working with a table of x,y coordinates and displaying them in ArcMap, you can export the x,y layer to a new feature class. You can also convert a table of coordinates into a new point feature class in ArcCatalog. Both of these procedures create a fully functional feature class with an ObjectID.
  • You can use the Make Query Table tool, which allows you to make the table using an OLE DB connection and to specify a column to use for the ObjectID or dynamically add the ObjectID.
  • With some data sources, you can register data with ArcGIS, which adds an ObjectID field.
Note:

ArcGIS and the geodatabase cannot consume 64-bit integers. The maximum possible ObjectID value is 2,147,483,648.

Related topics

  • Adding an ASCII or text file table

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS Platform

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Esri Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
Copyright © 2018 Esri. | Privacy | Legal