Sybase Technical Library - Product Manuals Home
[Search Forms] [Previous Section with Hits] [Next Section with Hits] [Clear Search] Expand Search

Creating
defaults [Table of Contents] Creating rules

Transact-SQL User's Guide

[-] Chapter 12 Defining Defaults and Rules for Data
[-] Dropping defaults

Dropping defaults

To remove a default from the database entirely, use the drop default command. Unbind the default from all columns and user datatypes before you drop it. (See "Unbinding defaults".) If you try to drop a default that is still bound, Adaptive Server displays an error message and the drop default command fails.

Here is how to remove citydflt. First, you unbind it:

sp_unbindefault citydft

Then you can drop citydft:

drop default citydflt 

The complete syntax of drop default is:

drop default [owner.]default_name 
  [, [owner.]default_name] ... 

A default can be dropped only by its owner. For more information about unbinding a default see sp_unbindefault and alter table in the Reference Manual.


Creating
defaults [Table of Contents] Creating rules