Unbinding rules  Getting information about defaults and rules

Chapter 13: Defining Defaults and Rules for Data

Dropping rules

To remove a rule from the database entirely, use the drop rule command. Unbind the rule from all columns and user datatypes before you drop it. If you try to drop a rule that is still bound, Adaptive Server displays an error message, and drop rule fails. However, you need not unbind and then drop a rule to bind a new one. Simply bind a new one in its place.

To remove phonerule after unbinding it:

drop rule phonerule 

The complete syntax for drop rule is:

drop rule [owner.]rule_name 
     [, [owner.]rule_name] ...

After you drop a rule, new data entered into the columns that previously were governed by it goes in without these constraints. Existing data is not affected in any way.

A rule can be dropped only by its owner.





Copyright © 2005. Sybase Inc. All rights reserved. Getting information about defaults and rules

View this book as PDF