The SA_LABEL_ADMIN.ALTER_LABEL procedure is used to change the string label definitions associated with label tags. The labels themselves cannot be changed.
If the string associated with a label tag is changed, the sensitivity of the data in the row will change accordingly. Ensure that when specifying the label to change, it can be referenced by its label tag or string value.
Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition provides only MySQL-compatible mode.
Syntax
SA_LABEL_ADMIN.ALTER_LABEL (
policy_name IN VARCHAR,
label_tag IN BINARY_INTEGER,
new_label_value IN VARCHAR := NULL,
new_data_label IN BOOLEAN := NULL );
Parameters
| Parameter | Description |
|---|---|
| policy_name | The name of the existing policy. To find existing policies, query the POLICY_NAME column of the ALL_SA_POLICIES view. |
| label_tag | The integer tag assigned to the label to be changed. To find existing labels, query the LABEL_TAG column of the ALL_SA_LABELS view. |
| new_label_value | The new string representation of the label value. If NULL, the existing value is not changed. |
| new_data_label | TRUE if the label is used to tag row data. If NULL, the existing value is not changed. |
Examples
The following example changes the label_tag and label_value of the shield_agent_policy policy.
BEGIN
SA_LABEL_ADMIN.ALTER_LABEL (
policy_name => 'shield_agent_policy',
label_tag => 60000,
new_label_value => 'L6',
new_data_label => TRUE);
END;
/