Skip To Content

Truncate Table


Removes all rows from a database table or feature class using truncate procedures in the database.



    If a selection is applied to a layer or table view, the selection will be ignored—all records will be truncated.

  • Supported data types are simple points, lines, or polygons stored in a database. Complex data types such as Terrains, Topologies, or Network Datasets are not supported as input.

  • Versioned data is not supported as input. Data must be unregistered as versioned before the tool will execute successfully.

  • Truncate commands do not utilize database transactions and are unrecoverable. This improves performance over row-by-row deletion.

  • For workflows where all rows are removed from a table or feature class and there is no need to back up the transactions, such as nightly reloading of data, it is recommended that this tool be used to perform the task.


ParameterExplanationData Type

Input database table or feature class that will be truncated.

Table View

Derived Output

NameExplanationData Type

The truncated table.

Table View

Code sample

TruncateTable example 1 (Python window)

The following Python window script demonstrates how to use the TruncateTable tool in immediate mode.

import arcpy
TruncateTable example 2 (stand-alone script)

The following Python window script demonstrates how to use the TruncateTable tool.

# Name:
# Description: Truncates all tables in a file geodatabase.

# Import system modules
import arcpy

# Set the workspace.
arcpy.env.workspace = "C:/work/vancouver.gdb"

# Get a list of all the tables.
tableList = arcpy.ListTables()

# Loop through the list and run truncate
for table in tableList:


Licensing information

  • Basic: Yes
  • Standard: Yes
  • Advanced: Yes

Related topics