The SA_LABEL_ADMIN.CREATE_LABEL procedure creates data labels.
Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition provides only MySQL mode.
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 an existing policy. You can query the POLICY_NAME column of the ALL_SA_POLICIES data dictionary view for existing policies. |
| label_tag | The unique integer value (0-9999999) that represents the sorting order of the policy label, relative to other policy labels. This value must have 1 to 8 digits in length. |
| label_value | The string representation of the label to be created. The value can be the short name of the level. You can query the SHORT_NAME column of the ALL_SA_LEVELS view for short names of levels. |
| data_label | The value of this parameter is TRUE if the label can be used to label row data. You can use this option to define the label as valid for data. |
Examples
The following example creates a label for shield_agent_policy:
BEGIN
SA_LABEL_ADMIN.CREATE_LABEL (
policy_name => 'shield_agent_policy',
label_tag => 50000,
label_value => 'L5',
data_label => TRUE);
END;
/