Truncate Table (Data Management Tools)
Summary
Removes all rows from a database table or feature class using truncate procedures in the database.
Usage
Caution:
If a selection is applied to a layer or table view, the selection will be ignored and 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, and network datasets are not supported as input.
The input database table or feature class must be from a database connection established as the data owner.
Versioned data is not supported as input. Data must be unregistered as versioned before the tool will run successfully.
If the input table has archiving enabled, rows will still exist in the history table after running the tool. To remove these rows, you can disable archiving, run the tool, and enable archiving again.
Truncate commands do not use database transactions and are unrecoverable. This improves performance over row-by-row deletion.
Use this tool for workflows in which all rows will be removed from a table or feature class and there is no requirement to back up the transactions, such as the nightly reloading of data.
This tool supports a feature service layer as input when connected as a user that can administer the service, and the
supportsTruncateservice property istrue.This tool does not support feature classes with attachments. To delete rows from a feature class that has attachments, use the Delete Rows tool.
Parameters
| Label | Explanation | Data type |
|---|---|---|
|
Input Table |
The input database table or feature class that will be truncated. |
Table View |
Derived output
| Label | Explanation | Data type |
|---|---|---|
|
Truncated Table |
The truncated table. |
Table View |
Environments
Licensing information
- Basic: Yes
- Standard: Yes
- Advanced: Yes