Modifying structured type attributes
To change an attribute of a structured column value, invoke the mutator method for the attribute you want to change.
Example
For example, to change the street
attribute
of an address, you can invoke the mutator method for street
with
the value to which it will be changed. The returned value is an address
with the new value for street
. The following example invokes
a mutator method for the attribute named street
to
update an address type in the Employee
table:
UPDATE Employee
SET Address = Address..street('Bailey')
WHERE Address..street = 'Bakely';
The following
example performs the same update as the previous example, but instead
of naming the structured column for the update, the SET clause directly
accesses the mutator method for the attribute named street
:
UPDATE Employee
SET Address..street = 'Bailey'
WHERE Address..street = 'Bakely';