17.20 - Example: Setting an Alternate Constraint Value - Analytics Database - Teradata Vantage

Teradata Vantage™ - Analytics Database Security Administration - 17.20

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2023-03-07
dita:mapPath
hjo1628096075471.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
zuy1472246340572

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, ... ;