Field names in Spatial Analyst

Available with Spatial Analyst license.

When working with attribute tables, there may be some restrictions on field names you can use. These restrictions may come in the form of the length, the name itself, or the characters used. The restrictions may also vary according to the particular format. By following these guidelines detailed below, you should avoid having any problems with improper field names.

Name restrictions based on characters

In general, field names should start with a letter, not a number or a special character. To avoid problems with the English character set, it is recommended that you limit the first character of the field name to contain only letters of the alphabet (a to z, A to Z). After the first letter, digits (0 to 9), underscores (_) and hyphens (-) can be used.

Special characters that are explicitly not allowed include (but are not limited to) the following:

+   *   /   !   ^   %
(   )   [   ]   {   }
,   ~   '   "   :   ;
>   <   &   |   \   =
@   #   $

Name restrictions based on length

The maximum allowed length depends on the format of the table. Field names are limited to 64 characters for both file and personal geodatabases, 31 characters in SQL Server and SQLExpress, 30 characters in Oracle and DB2, 16 characters for INFO, and dBASE is limited to 10 characters.

Consult the documentation for the length restrictions for the particular table formats you are using for additional details.

Name restrictions based on words

Certain keywords are not allowed, including the following:

AND      BEGIN    BREAK    BRK      CAND     COR      CXOR
DIFF     DIV      DO       DOCELL   EQ       ELSE     END
ENDIF    GE       GT       IF       IN       LE       LT
MAXOF    MINOF    MOD      NE       NOT      OFF      ON
OR       OVER     THEN     WHILE    XOR

Related topics