Binding defaults  How defaults affect NULL values

Chapter 13: Defining Defaults and Rules for Data

Unbinding defaults

Unbinding a default means disconnecting it from a particular column or user-defined datatype. An unbound default is still stored in the database and is available for future use. Use sp_unbindefault to remove the binding between a default and a column or datatype.

Here is how you unbind the current default from the city column of the friends_etc table:

execute sp_unbindefault "friends_etc.city"

To unbind a default from the user-defined datatype citytype, use:

sp_unbindefault citytype

The complete syntax of sp_unbindefault is:

sp_unbindefault objname [, futureonly] 

If the objname parameter you give is not of the form table.column, Adaptive Server assumes it is a user-defined datatype. When you unbind a default from a user-defined datatype, the default is unbound from all columns of that type unless you give the optional futureonly parameter, which prevents existing columns of that datatype from losing their binding with the default.





Copyright © 2005. Sybase Inc. All rights reserved. How defaults affect NULL values

View this book as PDF