SECLABEL_BY_NAME Function

The SECLABEL_BY_NAME function enables users to provide a security label directly by specifying its name.

The following INSERT statement inserts a row into table T1, which is protected by the security policy called ‘MegaCorp’. The VALUES clause of the INSERT statement provides the security label ‘mylabel’ for the row to be inserted by using the SECLABEL_BY_NAME function.
INSERT INTO T1 VALUES (SECLABEL_BY_NAME ('MegaCorp', 'mylabel'), 1, 'xyz');

The success of this SECLABEL_BY_NAME function call does not guarantee success of the INSERT operation in this example, because whether or not the user has sufficient security credentials to insert the label mylabel into the row is subject to the IDSLBACWRITE rules of the MegaCorp security policy.