Creating a default

A default is a value that Adaptive Server inserts in a table column when a row of data is inserted and no value is provided for the column. Once you create a default, you can bind it to table columns and to user datatypes.

Privileges

Only a database owner or a user with create default permission can create a default.

StepsCreating a default

  1. In a database, select the Defaults folder.

  2. Select File | New | Default (wizard). The Default Creation wizard opens.

  3. Enter a name for the default.

  4. Accept the default owner or choose a different owner from the drop-down list.

  5. In the Default Expression box, enter a SQL expression for the default. The expression is the text that would follow the as keyword in a create default command.

  6. Click OK.

NoteYou can also create a default using the Add Default (Template). Select Defaults and double-click Add Default (Template).

Shortcuts

Select the Defaults folder. In the right pane double-click the Add Default (wizard) icon.