Create a datatype based on the available datatypes for your data server.
Prerequisites Before you can create a user-defined datatype, be sure the appropriate data server is running,
and you created and established a connection to the data server.
- Right-click the
User Defined Types folder, and choose
.
The
New User Defined Type page appears.
-
Enter the datatype name in the
Name field.
- Provide settings for the new type.
Setting |
Description |
System datatype
|
Select a base datatype from the drop-down list.
|
Null value setting
|
Specify the null-value setting. The default is to use the database null-value setting. |
Has default value
|
Select Has default value to specify a default value for this datatype.
- User-defined: Select this option to specify your own default for this datatype, and enter a default value in the corresponding text field. To specify this value as a literal string, select Literal string.
- System-defined: Select this option to specify a system-defined default value, and select autoincrement or global autoincrement from the corresponding drop-down. If necessary, specify a partition size.
|
Check constraint |
(Optional) Enter
a check constraint for data of this datatype. |
- Click
Next, and specify save and execution
properties for the datatype.
Field |
Description |
Generate script |
Select this option to generate the script for the datatype. |
Enter or select the parent folder |
Specify an existing project or create a new project in
which to save the SQL. |
File name |
Enter the name of the file in which to store the
SQL. |
Execute immediately |
Execute the SQL immediately. If you do not select this
option, you must complete execution of the SQL later to create the datatype. |
Open in editor after creation |
Create the datatype, and then open it in the User Defined Type Editor. |
- Click
Finish to create the datatype.
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.