Unbinds a created default value from a column or from a user-defined datatype.
sp_unbindefault objname [, futureonly]
sp_unbindefault "employees.startdate"
sp_unbindefault ssn
sp_unbindefault ssn, futureonly
Use sp_unbindefault to remove defaults created with sp_bindefault. Use alter table to drop defaults declared using the create table or alter table statements.
Columns of a user-defined datatype lose their current default unless the default has been changed or the value of the optional second parameter is futureonly.
To display the text of a default, execute sp_helptext with the default name as the parameter.
See also create default, drop default in Reference Manual: Commands.
The permission checks for sp_unbindefault differ based on your granular permissions settings.
Setting | Description |
---|---|
Enabled | With granular permissions enabled, you must be the object owner or the user datatype owner. |
Disabled | With granular permissions disabled, you must be the object owner. |
Values in event and extrainfo columns from the sysaudits table are:
Information | Values |
---|---|
Event | 38 |
Audit option | exec_procedure |
Command or access audited | Execution of a procedure |
Information in extrainfo |
|
Information | Values |
---|---|
Event | 67 |
Audit option | unbind |
Command or access audited | sp_unbindefault |
Information in extrainfo |
|