Skip To Content

Delete Attribute Rule

Summary

Delete one or more attribute rules from a dataset.

Learn more about rules.

Usage

  • Attribute rules are only supported on enterprise geodatabase datasets.

  • If you specify both a rule name and a rule type when running this tool, upon execution, the tool will verify that the type of rule specified matches the rule type specified. If they do not match, the rule will not be deleted.

Syntax

DeleteAttributeRule_management (in_table, names, {type})
ParameterExplanationData Type
in_table

The table or feature class to delete the attribute rule from.

Table View
names
[names,...]

The names of the rules to delete from the dataset.

String
type
(Optional)

The type of attribute rules to delete.

  • CALCULATIONDelete a calculation rule.
  • CONSTRAINTDelete a constraint rule.
String

Code sample

DeleteAttributeRule example (Python window)

Delete two specific calculation attribute rules from a feature class.

import arcpy
arcpy.DeleteAttributeRule_management("C:\\MyProject\\MyDatabase.sde\\pro.USER1.campusData", 
                                      "Rule A;Rule B", "CALCULATION")

Environments

This tool does not use any geoprocessing environments.

Licensing information

  • ArcGIS Desktop Basic: No
  • ArcGIS Desktop Standard: Yes
  • ArcGIS Desktop Advanced: Yes

Related topics