Example: Setting an Alternate Constraint Value - Advanced SQL Engine - Teradata Database

Security Administration

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
September 2020
Language
English (United States)
Last Update
2021-01-23
dita:mapPath
ied1556235912841.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1100
lifecycle
previous
Product Category
Teradata Vantage™

You can provide an alternate constraint value in the SQL statement. For example:

MERGE INTO table1 AS tgt USING table2 AS src
   ON (tgt.col1 = src.col1) WHEN MATCHED THEN UPDATE SET Level = 2;

where SET Level = 2 sets the security constraint column “Level” to a value of 2 for all updated rows.

You can alternately specify:

  • That a value is taken from another column. For example:
    SET Level = src.column_name ;
  • Values for multiple constraint columns. For example:
    SET Level = 2, Class = 4, Job = 7, ... ;