Contents Index SQL statements for implementing integrity constraints Creating column defaults

ASA SQL User's Guide
  Ensuring Data Integrity

Using column defaults


Column defaults automatically assign a specified value to particular columns whenever someone enters a new row into a database table. The default value assigned requires no any action on the part of the client application, however if the client application does specify a value for the column, the new value overrides the column default value.

Column defaults can quickly and automatically fill columns with information, such as the date or time a row is inserted, or the user ID of the person typing the information. Using column defaults encourages data integrity, but does not enforce it. Client applications can always override defaults.

Supported default values 

SQL supports the following default values:


Creating column defaults
Modifying and deleting column defaults
Working with column defaults in Sybase Central
Current date and time defaults
The user ID default
The AUTOINCREMENT default
The NEWID default
The NULL default
String and number defaults
Constant expression defaults

Contents Index SQL statements for implementing integrity constraints Creating column defaults