17.00 - SET SESSION CONSTRAINT Syntax Elements - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Data Definition Language Syntax and Examples

Advanced SQL Engine
Teradata Database
Release Number
September 2020
Content Type
Programming Reference
Publication ID
English (United States)
Last Update
One or more security constraint values (levels and categories) are being changed for the session.
Name of an existing constraint.
The specified constraint_name must be currently assigned to the user.
You can specify a maximum of 6 hierarchical constraints and 2 non-hierarchical constraints per SET SESSION CONSTRAINT statement.
Name of a hierarchical level, valid for the constraint_name, that is to replace the default level.
The specified level_name must be currently assigned to the user. Otherwise, Vantage returns an error to the requestor.
A set of one or more existing non-hierarchical category names valid for the constraint_name.
Because all assigned category (non-hierarchical) constraint values assigned to a user are automatically active, SET CONSTRAINT is only useful to specify a subset of the assigned categories for the constraint.
For example, assume that User BOB has 3 country codes, and wants to load a table with data that is to be made available to User CARL who only has rights to see data for his own country. User BOB can use SET SESSION CONSTRAINT to specify only the country code for User CARL when loading the data so Carl can access the data later.
If you specify NULL and then update a table, only users with OVERRIDE privileges can subsequently access the affected table rows.