1 Version 4.0 -- 1/15/89 sp_unbindrule
______________________________________________________________________
NAME: sp_unbindrule
FUNCTION:
Unbinds a rule from a column or from a user-defined datatype.
SYNTAX:
sp_unbindrule objname [, futureonly]
EXAMPLES:
1) sp_unbindrule "employees.startdate"
Unbinds the rule from the startdate column of the employees
sp_unbindrule Version 4.0 -- 1/15/89 2
______________________________________________________________________
table.
2) sp_unbindrule def_ssn
Unbinds the rule from the user-defined datatype named ssn.
If you don't want to unbind the rule from existing ssn
columns, use the string futureonly as an optional second
parameter.
3) sp_unbindrule ssn, futureonly
The user datatype ssn no longer has a rule, but no existing
ssn columns are affected.
PARAMETERS:
objname - is the name of the table and column or of the user-
defined datatype from which the rule is to be unbound. If
3 Version 4.0 -- 1/15/89 sp_unbindrule
______________________________________________________________________
the parameter is not of the form "table.column", then objname
is taken to be a usertype. When unbinding a rule from a user
datatype, any columns of that type that have the same rule as
the user datatype had are also unbound. Columns of that type
whose rule has been changed are unaffected.
futureonly - prevents existing columns of the specified user
datatype from losing their rule.
COMMENTS:
o Executing sp_unbindrule removes a rule from a column or from a
user datatype in the current database.
o If unbinding a rule from a table column, the objname argument
must be of the form "table.column".
o The rule is unbound from all existing columns of the user-
defined datatype unless their default has previously been
changed, or the value of the optional second parameter is
sp_unbindrule Version 4.0 -- 1/15/89 4
______________________________________________________________________
futureonly.
MESSAGES:
The table column supplied for the objname parameter no longer has
any rule.
The user-defined datatype supplied for the objname parameter no
longer has any rule.
The table name supplied for the objname parameter either doesn't
exist in the database or you don't own it. You can only bind
or unbind rules on tables that you own.
The user-defined datatype supplied for the objname parameter
either doesn't exist in the database or you don't own it.
You can only bind or unbind rules from datatypes that you
own.
Rules on other columns of the user datatype specified were
unbound, unless their rules had previously been changed.
The objname parameter may not include a database reference.
5 Version 4.0 -- 1/15/89 sp_unbindrule
______________________________________________________________________
PERMISSIONS:
Execute permission to object owner.
TABLES USED:
syscolumns, sysobjects, systypes
SEE ALSO:
sp_bindefault, sp_bindrule, sp_unbindefault, CREATE RULE, DROP
RULE