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