ALTER MASK
The ALTER MASK statement alters a column mask that exists at the current server.
Invocation
This statement can be embedded in an application program or issued interactively. It is an executable statement that can be dynamically prepared.
Authorization
The authorization ID of the statement must have security administrator authority. See Administrative authority.
Syntax
Description
- mask-name
- Identifies the column mask to be altered. It must identify a column mask that exists at the current server.
- ENABLE, DISABLE, or REGENERATE
- ENABLE
- Specifies that the column mask is to be enabled for column access control. If column access control is not currently activated for the table, the column mask will become effective when column access control is activated for the table. If column access control is currently activated for the table, the column mask becomes effective immediately.
- DISABLE
- Specifies that the column mask is to be disabled for column access control. If column access control is not currently activated for the table, the column mask will remain ineffective when column access control is activated for the table. If column access control is currently activated for the table, the column mask becomes ineffective.
- REGENERATE
- Specifies that the column mask is to be regenerated. The column mask definition in the catalog is used and existing dependencies and authorizations, if any, are retained. The column mask definition is reevaluated as if the column mask were being created. The user-defined functions that are referenced in the column mask definition must be resolved to the same secure UDFs as were resolved during the column mask creation.
Examples
Example 1: Enable column mask M1.
ALTER MASK M1 ENABLE
Example 2: Disable column mask M1.
ALTER MASK M1 DISABLE
Example 3: Regenerate column mask M1.
ALTER MASK M1 REGENERATE