Removes a user-defined default.
drop default [owner.]default_name [, [owner.]default_name] ...
is the name of an existing default. Execute sp_help to display a list of existing defaults. Specify the owner’s name to drop a default of the same name owned by a different user in the current database. The default value for owner is the current user.
Removes the user-defined default datedefault from the database:
drop default datedefault
You cannot drop a default that is currently bound to a column or to a user-defined datatype. Use sp_unbindefault to unbind the default before you drop it.
You can bind a new default to a column or user-defined datatype without unbinding its current default. The new default overrides the old one.
When you drop a default for a NULL column, NULL becomes the column’s default value. When you drop a default for a NOT NULL column, an error message appears if users do not explicitly enter a value for that column when inserting data.
ANSI SQL – Compliance level: Transact-SQL extension.
drop default permission defaults to the owner of the default and is not transferable.
Values in event and extrainfo columns of sysaudits are:
Event |
Audit option |
Command or access audited |
Information in extrainfo |
---|---|---|---|
31 |
drop |
drop default |
|
Commands create default
System procedures sp_help, sp_helptext, sp_unbindefault