SQL$HELP_OLD72.HLB  —  ALTER  TABLE  Arguments  domain-name
    The name of a domain created in a CREATE DOMAIN statement. SQL
    gives the column the data type specified in the domain. For more
    information on domains, see the CREATE DOMAIN. statement.

    For most purposes, specify a domain instead of an explicit data
    type.

    o  Domains ensure that columns in multiple tables that serve the
       same purpose all have the same data type. For example, several
       tables in the sample personnel database refer to the domain
       ID_DOM.

    o  A domain lets you change the data type for all the columns
       that refer to it in one operation by changing the domain
       itself with an ALTER DOMAIN statement. For example, if you
       want to change the data type for the column EMPLOYEE_ID from
       CHAR(5) to CHAR(6), you need only alter the data type for ID_
       DOM. You do not have to alter the data type for the column
       EMPLOYEE_ID in the tables DEGREES, EMPLOYEES, JOB_HISTORY, and
       SALARY_HISTORY, nor do you have to alter the column MANAGER_ID
       in the DEPARTMENTS table.

    However, you might not want to use domains when you create tables
    if:

    o  Your application must be compatible with the Oracle RDBMS
       language.

    o  You are creating tables that do not need the advantages of
       domains.
Close Help