The SA_LABEL_ADMIN.CREATE_LABEL procedure is used to create a data label.
Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition does not support this feature.
Syntax
SA_LABEL_ADMIN.CREATE_LABEL (
policy_name IN VARCHAR,
label_tag IN BINARY_INTEGER,
label_value IN VARCHAR,
data_label IN BOOLEAN := TRUE);
Parameters
| Parameter | Description |
|---|---|
| policy_name | The name of the existing policy. To find the name of an existing policy, query the POLICY_NAME column of the ALL_SA_POLICIES view. |
| label_tag | A unique integer value (0-9999999) that indicates the sorting order of this label relative to other policy labels. The length of this value must be between 1 and 8 characters. |
| label_value | The string representation of the label to be created, which can use the short name of the level. You can find the short name of a level by querying the SHORT_NAME column of the ALL_SA_LEVELS view. |
| data_label | TRUE if the label can be used to mark row data. Use this option to define the label as valid for data. |
Examples
The following example creates a label for the shield_agent_policy policy.
BEGIN
SA_LABEL_ADMIN.CREATE_LABEL (
policy_name => 'shield_agent_policy',
label_tag => 50000,
label_value => 'L5',
data_label => TRUE);
END;
/
