SQL$HELP_OLD72.HLB  —  CREATE  DOMAIN  Arguments

1  –  char-data-types

    A character type. See the Data_Types HELP topic for more
    information on data types.

2  –  character-set-name

    A valid character set.

3  –  COLLATING_SEQUENCE

    Specifies a collating sequence for the named domain.

    The OpenVMS National Character Set (NCS) utility provides a
    set of predefined collating sequences and also lets you define
    collating sequences of your own. The COLLATING SEQUENCE clause
    accepts both predefined and user-defined NCS collating sequences.

    Before you use the COLLATING SEQUENCE clause in a CREATE DOMAIN
    statement, you must first specify the NCS collating sequence for
    SQL using the CREATE COLLATING SEQUENCE statement. The sequence-
    name argument in the COLLATING SEQUENCE clause must be the same
    as the sequence-name in the CREATE COLLATING SEQUENCE statement.

4  –  COMMENT_IS

    Adds a comment about the domain. SQL displays the text of the
    comment when it executes a SHOW DOMAIN statement. Enclose the
    comment in single quotation marks ( ') and separate multiple
    lines in a comment with a slash mark (/).

5  –  DATABASE ALIAS alias

    In the FROM path-name clause, specifies the name for an attach
    to a particular database. SQL adds the domain definition to the
    database referred to by the alias.

    If you do not specify an alias, SQL adds the domain definition to
    the default database. See the User_Supplied_Names HELP topic for
    more information on default databases and aliases.

6  –  date-time-data-types

    A data type that specifies a date, time, or interval. See the
    Data_Types HELP topic for more information about date-time data
    types.

7  –  DEFAULT value-expr

    Provides a default value for a domain.

    You can use any value expression including subqueries,
    conditional, character, date/time, and numeric expressions as
    default values. See Value Expressions for more information about
    value expressions.

    For more information about NULL, see the NULL_Keyword HELP topic.

    The value expressions described in Value Expressions include
    DBKEY and aggregate functions. However, the DEFAULT clause is
    not a valid location for referencing a DBKEY or an aggregate
    function. If you attempt to reference either, you receive a
    compile-time error.

    If you do not specify a DEFAULT for a column, it inherits the
    DEFAULT from the domain. If you do not specify a default for
    either the column or domain, SQL assigns NULL as the default
    value.

8  –  domain-constraint

    Creates a constraint for the named domain.

    Specify a domain constraint when you create a domain to limit
    which values can be stored in columns based on the domain. Domain
    constraints specify that columns based on the domain contain only
    certain data values or that data values can or cannot be null.

    Use the CHECK clause to specify that a value must be within a
    specified range or that it matches a list of values. When you
    specify a CHECK clause for a domain constraint, you ensure that
    all values stored in columns based on the domain are checked
    consistently.

9  –  domain-name

    The name of a domain you want to create. The domain name must be
    unique among domain names in the schema. You can qualify it with
    an alias or (in multischema databases only) a schema name.

10  –  FROM pathname

    Specifies the repository path name of a repository field
    definition. SQL creates the domain using the definition from
    this field and gives the domain the name of the field definition.

    Creating a domain based on a repository domain definition is
    useful when many applications share the same definition. Changes
    to the common definition can be automatically reflected in all
    applications that use it.

    You can create a domain using the FROM path-name clause only if
    the field definition in the repository was originally created
    using the repository CDO utility. For instance, you cannot create
    a domain using the FROM path-name clause if the definition was
    created in the repository as part of an SQL session. Oracle
    Rdb requires that the field names referenced in the VALID IF
    expression of the CDO utility match the name of the global field
    being defined or changed.

                                   NOTE

       Changes by other users or applications to the field
       definition in the repository will affect the domain
       definition once the database is integrated to match the
       repository with an INTEGRATE DATABASE . . . ALTER FILES
       statement.

    You can use the FROM path-name clause only if the database was
    attached specifying PATHNAME. You can specify either a full
    repository path name or a relative repository path name.

    You cannot specify formatting clauses when you use the FROM path-
    name form of the CREATE DOMAIN statement.

    You cannot use the FROM path-name clause when embedding a CREATE
    DOMAIN statement in a CREATE DATABASE statement.

11  –  data-type

    Syntax options:

       IS data-type
       AS data-type

    A valid SQL data type. See the Data_Types HELP topic for more
    information on data types.

12  –  NO_COLLATING_SEQUENCE

    Specifies that this domain uses the standard default collating
    sequence, that is, ASCII. Use the NO COLLATING SEQUENCE clause to
    override the collating sequence defined for the database in the
    CREATE DATABASE or ALTER DATABASE statement.

13  –  sql-and-dtr-clause

    Optional SQL and DATATRIEVE formatting clause. See the DATATRIEVE
    HELP topic for more information on formatting clauses.

14  –  STORED_NAME_IS

    Specifies a name that Oracle Rdb uses to access a domain created
    in a multischema database. The stored name lets you access
    multischema definitions using interfaces, such as Oracle RMU,
    the Oracle Rdb management utility, that do not recognize multiple
    schemas in one database. You cannot specify a stored name for a
    domain in a database that does not allow multiple schemas. For
    more information about stored names, see the User_Supplied_Names
    HELP topic.
Close Help