After creating a default  Creating rules

Chapter 13: Defining Defaults and Rules for Data

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.





Copyright © 2005. Sybase Inc. All rights reserved. Creating rules

View this book as PDF