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. In the Databases folder in Enterprise Explorer, under the database connection profile, expand the Databases folder, and then expand the tree for a database and then the tree for the appropriate schema owner.
  2. Right-click the User Defined Types folder, and select New > User Defined Type .
  3. Specify an Owner, and enter the datatype Name.
  4. Provide settings for the new type.
    Setting Description
    System Datatype Select a base datatype.
    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 a Default. Select In Future Only to prevent existing columns or a specific user datatype from inheriting the new default. To create a new default, select Create and follow the instructions in the New Default wizard.
    Rule Select a Rule. 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.
  5. Click Next and specify save and execution properties.
    Field Description
    Generate Script Generate a SQL file for the object.
    Enter or Select the Parent Folder Specify an existing project or create a new project in which to save the SQL file.
    File Name Enter the file name in which to store the SQL code.
    Execute Immediately Execute the SQL code immediately. If you do not select this option, you must complete execution of the SQL file later to create the object.
    Open in Editor After Creation Create the object and open it in its associated editor.
  6. 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


Created June 25, 2009. Send feedback on this help topic to Sybase Technical Publications: pubs@sybase.com