SA_LABEL_ADMIN.ALTER_LABEL

2023-10-31 11:17:12  Updated

The SA_LABEL_ADMIN.ALTER_LABEL procedure alters the string label definition associated with a label tag. The label itself cannot be altered.

If you alter the string associated with the label tag, the sensitivity of the data in the row alters accordingly. Make sure that when you specify a label to be altered, the label 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 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 an existing policy. You can query the POLICY_NAME column of the ALL_SA_POLICIES data dictionary view for existing policies.
label_tag The integer tag assigned to the to-be-altered label. You can query the LABEL_TAG column of the ALL_SA_LABELS view for existing labels.
new_label_value The new string representation of the label value. If the value is NULL, the existing value is not changed.
new_data_label The value of this parameter is TRUE if the label can be used to label row data. If the value is NULL, the existing value is not changed.

Examples

The following example modifies the label_tag and label_value settings of shield_agent_policy:

BEGIN
   SA_LABEL_ADMIN.ALTER_LABEL (
     policy_name         => 'shield_agent_policy',
     label_tag              => 60000,
     new_label_value   => 'L6',
     new_data_label    => TRUE);
END;
/

Contact Us