Updated on 2024-08-20 GMT+08:00

DROP SECURITY LABEL

Description

DROP SECURITY LABEL is used to delete security labels from the current database.

Precautions

An initial user, a user with the SYSADMIN permission, or a user who inherits permissions of the built-in role gs_role_seclabel can delete security labels.

Syntax

1
DROP SECURITY LABEL label_name;

Parameters

  • label_name

    Security label name. The security label to be deleted must exist in the database.

Examples

1
2
3
4
5
6
7
8
9
-- Create a security label sec_label.
gaussdb=# CREATE SECURITY LABEL sec_label 'L1:G4';

-- Delete the security label sec_label2 that does not exist.
gaussdb=# DROP SECURITY LABEL sec_label2;
ERROR:  security label "sec_label2" does not exist

-- Delete the existing security label sec_label.
gaussdb=# DROP SECURITY LABEL sec_label;