How defaults and rules work  create default syntax

Chapter 13: Defining Defaults and Rules for Data

Creating defaults

You can create or drop defaults at any time, before or after data has been entered in a table. In general, to create defaults you:

  1. Define the default, using create default.

  2. Bind the default to the appropriate table column or user-defined datatype using sp_bindefault.

  3. Test the bound default by inserting data.

You can drop defaults using drop default and remove their association using sp_unbinddefault.

When you create and bind defaults:





Copyright © 2005. Sybase Inc. All rights reserved. create default syntax

View this book as PDF