Adds a field to the table of a feature class, feature layer and/or raster catalog.
Learn more about how Add Field works
Usage tips
-
See ArcGIS data types for a detailed explanation of field types.
-
A field of type raster allows you to have a raster image as an attribute. It is stored within or alongside the geodatabase. This is helpful when a picture is the best way to describe a feature. Precision, scale and length can not be set for fields of type raster.
-
Coverages, standalone tables, feature classes from ArcSDE and personal or file geodatabases, layer files, raster catalogs, and shapefiles will work as valid input for this command. VPF and CAD feature data overlays will not work, since they are read-only formats that are not native to ArcGIS.
-
The added field will always be displayed at the end of the table.
-
The Field Length parameter is only applicable on fields of type text or blob.
-
For coverages, shapefiles and dBase tables, if field type defines a character, blanks are inserted for each record. If field type defines a numeric item, zeros are inserted for each record.
-
For geodatabases, if field type defines a character or number <null> is inserted into each record if the FieldIsNullible parameter default is accepted.
-
A shapefile does not support alias for fields, so you cannot add a field alias to a shapefile.
-
It is only possible to add a field that is not nullable to an empty geodatabase feature class or table. Add Field cannot add a field that is not nullable when the rows already exist.
-
The Field Domain parameter can call an existing domain from a feature class in a personal, file or SDE geodatabase.
-
The precision and scale of a field describe the maximum size and precision of data that can be stored in the field. The precision describes the number of digits that can be stored in the field and the scale describes the number of decimal places for float and double fields. For example, if the field value is 54.234 then scale = 3 and precision = 5.Use the following guidelines for choosing the correct field type for a given precision and scale:
- When you create a float, double, or integer field and specify 0 for precision and scale, the tool will attempt to create a binary type field if the underlying database supports it. Personal and file geodatabases support only binary type fields, and precision and scale are ignored.
- When you create float and double fields and specify a precision and scale, if your precision is greater than 6, use a double; otherwise, use a float. If you create a double field and specify a precision of 6 or less, a float field is created. If you create a float field and specify a precision greater than 6, a double field is created.
- If you specify a scale of 0 and a precision of 10 or less, you should be creating integer fields. When creating integer fields, your precision should be 10 or less, or your field may be created as double.
-
When creating a new field in a geodatabase feature class or table, you can specify the field's type, but not it's precision, and scale. Even if the dialog allows you to add a value for precision or scale it will be ignored during execution.
-
The name of an existing domain must be specified for the Field Domain parameter. Enter invalid domain names or values will not cause the tool to fail but it will be ignored and no domain will be set for the field.
-
Fields set as REQUIRED are permanent and you will not be able to delete them with future processing. To allow for deletion at a later time set the field to NON_REQUIRED (the default).
-
For more information about adding fields see, Adding and deleting fields or About tabular data sources
-
For more information about the RASTER type option see, Raster datasets as attributes
-
The following environment affects this tool: workspace.