17.10 - CONSTRAINT - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Data Definition Language Syntax and Examples

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1144-171K
Language
English (United States)

Assign one or more row-level security constraints to the user_name.

There is a limit of 6 hierarchical constraints and 2 non-hierarchical constraints that can be assigned per user.

For more information about row-level security constraints, see CREATE CONSTRAINT.

row_level_security_constraint_column_name
Name of one or more row-level security constraints, each one followed by the list of the hierarchical levels or non-hierarchical categories, valid for the constraint, which are being assigned to the user_name.
  • Example hierarchical constraint assignment:
    CONSTRAINT = Classification_Level (Secret, Unclassified DEFAULT),
  • Example non-hierarchical constraint assignment:
    CONSTRAINT = Classification_Country (US, UK, GER)
level_name
Hierarchical levels, valid for the constraint, which are being assigned to the user_name.
DEFAULT
DEFAULT can be specified for 1 classification level from the specified list of level names for a hierarchical constraint. The specified level becomes the default value for the constraint when a session is established for the user.
If you do not specify DEFAULT for any of the listed classification levels, then the first level listed becomes the default for the user.
DEFAULT is not valid for non-hierarchical category constraints.
category_name
Non-hierarchical categories, valid for the constraint, which are being assigned to the user_name.
NULL