CREATE RULE
defines a legacy bound object
What changes
- Input
- catalog
- Output or change
- bound default or rule object (deprecated)
Syntax at a glance
CREATE RULE [ schema_name . ] rule_name AS condition_expression [ ; ]
Work example
A legacy schema still binds a standalone rule to a column or alias type.
Inventory its bindings and plan a reviewed replacement with a CHECK constraint before adding more use.
Check your work The replacement accepts the same valid values and rejects the same invalid values.
Open Microsoft Learn for full syntax, permissions, and details for your version.