Create a database default to specify a value to insert in a column (or in all columns of a user-defined datatype) if no value is explicitly supplied at insert time.
Before you create a default, be sure the data server for which you are creating a default is running and that you created and established a connection to the data server.
Field | Description |
---|---|
Owner | Select an owner from the drop-down menu. |
Name | Specify a name for the default in the corresponding text field. |
Default expression | This is an editable field for entering the default constant expression. The expression cannot include the names of any columns or other database objects. It can include global variables and built-in functions that do not reference database objects. Enclose character and date constants in quotes and use a "0x" prefix for binary constants. For example, to assign the current date to a default named todays_date , enter getdate() as the default expression. |
Preview | This field displays the DDL for creating the default. |
Field | Description |
---|---|
Generate script | Select this option to generate DDL for the default. |
Enter or select the parent folder | Specify an existing project or create a new project in which to save the DDL. |
File name | Enter the name of the file in which to store the DDL. |
Execute immediately | Execute the DDL immediately. If you do not select this option, you must complete execution of the DDL later to create the default. |
Open in editor after creation | Create the default, and then open it in the Defaults Editor. |
Send your feedback on this help topic to Sybase Technical Publications: pubs@sybase.com
Your comments will be sent to the technical publications staff at Sybase, Inc. For product-related issues or technical support, contact Sybase Technical Support at 1-800-8SYBASE.