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

Delete Rows (Data Management)

Release 9.3
Last modified March 8, 2012
E-mail This Topic Printable Version Give Us Feedback

Print all topics in : "Tools"


Related Topics

NOTE: This topic was updated for 9.3.1.


Deletes selected rows from the input rows

If the input rows are from a feature class or table, all rows will be deleted. If the input rows are from a layer or table view, only those rows selected in the layer will be deleted.


Usage tips

Command line syntax
An overview of the Command Line window
DeleteRows_management <in_rows>

Parameter Explanation Data Type
<in_rows>

The feature class, layer, table, or table view whose rows will be deleted

Table View
Data types for geoprocessing tool parameters


Command line example

deleterows_management c:\temp\consumers.dbf

Scripting syntax
About getting started with writing geoprocessing scripts
DeleteRows_management (in_rows)

Parameter Explanation Data Type
in_rows (Required)

The feature class, layer, table, or table view whose rows will be deleted

Table View

Data types for geoprocessing tool parameters


Script example

import arcgisscripting
gp = arcgisscripting.create()

gp.workspace = "c:/region/sales.mdb"
gp.toolbox = "management"

# Create a table view and select records to be deleted
gp.maketableview("customers", "customer_view")
query = '[STATUS] = "EXPIRED"'
gp.selectlayerbyattribute("customer_view", "NEW_SELECTION", query)

# Delete selected records
gp.deleterows("customer_view")

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