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

SQL Data Definition Language Syntax and Examples

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
Published
January 2021
Language
English (United States)
Last Update
2021-01-22
dita:mapPath
ncd1596241368722.ditamap
dita:ditavalPath
hoy1596145193032.ditaval
dita:id
B035-1144
lifecycle
previous
Product Category
Teradata Vantage™
CONSTRAINT
One or more security constraint values (levels and categories) are being changed for the session.
row_level_security_constraint_name
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.
level_name
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.
category_name
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.
NULL
If you specify NULL and then update a table, only users with OVERRIDE privileges can subsequently access the affected table rows.