Show Navigation | Hide Navigation
You are here:
Geoprocessing tool reference > Data Management toolbox > Fields toolset > Tools

Delete Field (Data Management)

Release 9.2
Last modified November 29, 2010
E-mail This Topic Printable Version Give Us Feedback

Print all topics in : "Tools"


Related Topics

Deletes one or more fields from a table of a feature class, feature layer, and/or raster catalog.


Usage tips

Command line syntax
An overview of the Command Line window
DeleteField_management <in_table> <drop_field; drop_field...>

Parameter Explanation Data Type
<in_table>

The table containing the field that is to be deleted. The existing Input Table will be modified.

Table View | Raster Layer
<drop_field; drop_field...>

The field, or fields, to be dropped from the Input Table. Only non-required fields may be deleted.

The Add Field button, which is used only in ModelBuilder, allows you to add expected field(s) so you can complete the dialog and continue to build your model.

Field
Data types for geoprocessing tool parameters


Command line example

deletefield "c:\test_data\soils.shp" "slope;loam"

Scripting syntax
About getting started with writing geoprocessing scripts
DeleteField_management (in_table, drop_field)

Parameter Explanation Data Type
in_table (Required)

The table containing the field that is to be deleted. The existing Input Table will be modified.

Table View | Raster Layer
drop_field (Required)

The field, or fields, to be dropped from the Input Table. Only non-required fields may be deleted.

The Add Field button, which is used only in ModelBuilder, allows you to add expected field(s) so you can complete the dialog and continue to build your model.

Field

Data types for geoprocessing tool parameters


Script example

import arcgisscripting
gp = arcgisscripting.create()

# Set a default workspace
gp.workspace = "c:\\test_data"

# Set a default workspace
gp.toolbox = "management"

try:
    # Delete fields from this shapefile.
    gp.deletefield ("soils.shp", "slope; loam")

except:
    # If an error occurs when running Deletefield, print out the error message.
    print gp.GetMessages(2)

Please visit the Feedback page to comment or give suggestions on ArcGIS Desktop Help.
Copyright © Environmental Systems Research Institute, Inc.