Create a database rule to specify the domain of acceptable values for a particular column or for any column of a user-defined datatype. You can create rules for only Adaptive Server Enterprise tables.
Before you can create a rule, be sure the data server on which you are creating the rule is running, and you created and established a connection to the data server.
Field | Description |
---|---|
Owner | Select an owner. |
Name | Specify a name for the rule. |
Access Rule | Specify the rule as an access rule, and choose And or Or. |
Rule Expression | Specify the conditions that define the rule. The rule expression can be any expression that is valid in a where clause, and can include arithmetic operators, relational operators, in, like, between, and so on. However, it cannot reference a column or any other database object. Built-in functions that do not reference database objects can be included. A rule takes one argument. The argument is prefixed by the @ sign and refers to the value that is entered in the update or insert command. You can use any name or symbol to represent the value when you write the rule, but the first character must be the @ sign. Enclose character and date constants in quotes, and precede binary constants with “0x”. |
Preview | DDL for creating the rule. |
Field | Description |
---|---|
Generate Script | Generate DDL for the rule. |
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 rule. |
Open in Editor After Creation | Create the rule, and then open it in the Rules Editor. |
For product-related issues, contact Sybase Technical Support at 1-800-8SYBASE. Send your feedback on this help topic directly to Sybase Technical Publications: pubs@sybase.com