ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • 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...

Table properties

  • Summary
  • Properties
  • Code sample

Summary

The Describe function returns the following properties for Tables. Dataset Properties are also supported. Editor Tracking Properties are supported if editor tracking has been enabled for this table.

Table properties are available in many types of Describe objects.

Properties

PropertyExplanationData Type
hasOID
(Read Only)

Indicates whether the table has an ObjectID field.

Boolean
OIDFieldName
(Read Only)

The name of the OID field if it exists.

String
fields
(Read Only)

A Python list of Field objects for this table. This is the same as using the ListFields function.

Field
indexes
(Read Only)

A Python list of Index objects for this table. This is the same as using the ListIndexes function.

Index

Code sample

Table properties example (stand-alone script)

The following stand-alone script displays the OID field name if the table has one. It then prints the name and type for each field in the table.

import arcpy

# Create a Describe object from the table.
#
desc = arcpy.Describe("C:/data/chesapeake.gdb/munich")

# If the table has an OID, print the OID field name
#
if desc.hasOID:
    print "OIDFieldName: " + desc.OIDFieldName

# Print the names and types of all the fields in the table
#
for field in desc.fields:
    print "%-22s %s %s" % (field.name, ":", field.type)
    #print field.name + " = " + field.type

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 © 2019 Esri. | Privacy | Legal