Format
CHANGE FIELD field-name
[ DESCRIPTION IS /*text*/ ]
[ NODESCRIPTION ] [ AUDIT IS /*text*/ ]
[ ]
[ field-property ]
[ NOfield-property ] ... .
[ ]
1 – Parameters
1.1 – field-name
Specifies the field element you are modifying.
1.2 – text
Modifies information. Within the DESCRIPTION clause, this is
information documenting the field; within the AUDIT clause, it
is a history list entry. Valid delimiters are /* */ or double
quotation marks (" ").
You can use Japanese to document comments in the DESCRIPTION or
AUDIT clause for a field. To do this, use the SET CHARACTER_SET
command, and set the character_set of the session to DEC_KANJI.
1.3 – field-property
Changes the value of an existing property, or adds a new
property, in the field element. You specify removal with the
NO keyword. See fld-properties for the field properties CDO
provides.
2 – Description
The CHANGE FIELD command modifies a field element by performing
a change in place. CDO changes the values you specify, and other
values remain the same.
If a field element is controlled, CDO freezes previous versions
and allows you to modify only the highest visible version. If a
field element is uncontrolled, CDO modifies the highest version
unless you specify another version number.
If a field element is controlled, you must reserve the field
before you can issue the CHANGE FIELD command. The SHOW FIELD
or SHOW RESERVATIONS command indicates whether this condition
exists.
When you change a field element that an Oracle Rdb database uses,
you may need to integrate the database with the repository. CDO
automatically sends a notice with the name of the database when
this is necessary.
3 – Examples
1.CDO> CHANGE FIELD POSTAL_CODE
cont> DESCRIPTION "A 5 DIGIT POSTAL_CODE: NOTE AUDIT"
cont> AUDIT "CHANGED TO 9 DIGIT POSTAL_CODE 6/30/90".
In this example, the CHANGE FIELD command modifies the
description clause and adds an audit clause to the POSTAL_
CODE field element.
2.CDO> CHANGE FIELD TOTAL
cont> NOINITIAL_VALUE.
In this example, the CHANGE FIELD command removes the INITIAL_
VALUE field property with the NO keyword.