After defining a rule  Dropping rules

Chapter 13: Defining Defaults and Rules for Data

Unbinding rules

Unbinding a rule disconnects it from a particular column or user-defined datatype. An unbound rule’s definition is still stored in the database and is available for future use.

There are two ways to unbind a rule:

Here is how to disassociate debtrule (or any other currently bound rule) from friends_etc.debt:

sp_unbindrule "friends_etc.debt" 

The rule is still in the database, but it has no connection to friends_etc.debt.

To unbind a rule from the user-defined datatype p#,

sp_unbindrule "p#" 

The complete syntax of sp_unbindrule is:

sp_unbindrule objname [, futureonly] 

If the objname parameter you use is not of the form “table.column”, Adaptive Server assumes it is a user-defined datatype. When you unbind a rule from a user-defined datatype, the rule is unbound from all columns of that type unless:





Copyright © 2005. Sybase Inc. All rights reserved. Dropping rules

View this book as PDF