Creating an ASE User-Defined Datatype

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.

  1. Right-click the User Defined Types folder, and choose New > User Defined Type.

    The New User Defined Type page appears.

  2. Specify an owner in the Owner drop-down menu, and enter the datatype name in the Name field.
  3. Provide settings for the new type.
    Setting Description
    System datatype Select a base datatype from the drop-down list.
    Null identity setting Specify the null-value setting. The default is to use the database null-value setting. You can also specify whether null values should be allowed or disallowed for this datatype.
    Default Select and bind a default by selecting a default from the Default drop-down. Select In future only to prevent existing columns or a specific user datatype from inheriting the new default. To create a new default, click Create, and follow the instructions in the New Default wizard.
    Rule Select and bind a rule by selecting a rule from the Rule drop-down. Select In future only to prevent existing columns or a specific user datatype from inheriting the new rule. To create a new rule, click Create, and follow the instructions in the New Rule wizard.
  4. 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.
  5. Click Finish to create the datatype.
Related concepts
User-Defined Type Editor
User-Defined Datatypes
Related tasks
Creating a SQL Anywhere or Sybase IQ User-Defined Datatype
Editing a SQL Anywhere or Sybase IQ User-Defined Datatype
Editing an ASE User-Defined Datatype
Renaming a User-Defined Datatype
Dropping a User-Defined Datatype
Opening a Referenced Database Object

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.