User-Defined Data Type (General Page)

Use this page to view or modify properties for a user-defined data type (UDDT).

Options

  • Allow NULLs
    Specify whether the UDDT can accept NULL values. The nullability of an existing UDDT is not editable.

  • Data type
    Select the base data type from the list box. The list box displays all data types except for the geography, geometry, hierarchyid, sysname, timestamp , and xml data types. The data type of an existing UDDT is not editable.

  • Default
    Optionally select a rule or a default to bind to the user-defined data type.

  • Length/Precision
    Displays the length or precision of the data type as applicable. Length applies to character-based UDDTs; Precision applies only to numeric-based UDDTs. The label changes depending on the data type selected earlier. This box is not editable if the length or precision of the selected data type is fixed.

    Length is not displayed for nvarchar(max), varchar(max), or varbinary(max) data types.

  • Name
    If you are creating a new UDDT, type a unique name to be used across the database to represent the UDDT. The maximum number of characters must match the system SYSNAME data type. The name of an existing user-defined data type is not editable.

  • Rule
    Optionally select a rule to bind to the user-defined data type.

  • Scale
    Specify the maximum number of decimal digits that can be stored to the right of the decimal point.

  • Schema
    Select a schema from a list of all schemas available to the current user. The default selection is the default schema for the current user.

    For SQL Server 2000 or SQL Server 7.0, specify the owner of the UDDT. The default value is the current user. A user who does not have sysadmin privileges can select only the current user; a user who has sysadmin privileges can select any owner from a list of database users.

  • Storage
    Displays the maximum storage size for the UDDT. Maximum storage sizes vary, based on precision.

    1 – 9

    5

    10 – 19

    9

    20 – 28

    13

    29 – 38

    17

    For nchar and nvarchar data types, the storage value is always two times the value in Length.

    Storage is not displayed for nvarchar(max), varchar(max), or varbinary(max) data types.