ALTER CONSTRAINT Syntax Elements - Advanced SQL Engine - Teradata Database

SQL Data Definition Language Syntax and Examples

Product
Advanced SQL Engine
Teradata Database
Release Number
17.00
Published
September 2020
Language
English (United States)
Last Update
2021-01-23
dita:mapPath
wgr1555383704548.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1144
lifecycle
previous
Product Category
Teradata Vantage™
constraint_name
The name of the row-level security constraint object to be altered.
For information about naming database objects, see Teradata Vantage™ - SQL Fundamentals, B035-1141.
VALUES
The string to follow is a set of name:value pairs that make up the classification system enforced by the constraint_name.
If you specify any name:value pairs, the system deletes any previously existing name:value pairs for the constraint_name.
name
The name of a member of the classification system defined in the constraint_name. Must be either:
  • a hierarchical level name
  • a non-hierarchical category name
value
The value code for the corresponding name in a name:value pair.
For details about name:value pairs, see CREATE CONSTRAINT.
FUNCTION
This option changes the list of currently existing UDFs for the constraint_name.
ADD
To add a new DELETE, INSERT, SELECT, or UPDATE function to constraint_name.
There must not be any UDF currently defined for the specified statement type in the constraint object, and the specified UDF must reside in the SYSLIB database.
REPLACE
To replace an existing DELETE, INSERT, SELECT, or UPDATE function in constraint_name.
The new UDF replaces the existing function for that statement type and must reside in the SYSLIB database.
action
One of the following:
  • DELETE

    The UDF function_name being added, dropped, or replaced enforces row-level security restrictions on the DELETE operation.

  • INSERT

    The UDF function_name being added, dropped, or replaced enforces row-level security restrictions on the INSERT operation.

  • SELECT

    The UDF function_name being added, dropped, or replaced enforces row-level security restrictions on the SELECT operation.

  • UPDATE

    The UDF function_name being added, dropped, or replaced enforces row-level security restrictions on the UPDATE operation.

SYSLIB.function_name
The name of the constraint UDF that is subject to the ADD or REPLACE request.
You cannot specify SYSLIB.function_name for the DROP option.
If you specify function_name, the specified function must currently exist in the SYSLIB database.
DROP
To drop an existing DELETE, INSERT, SELECT, or UPDATE function from constraint_name.
Specify only the statement type for the DROP option, but do not specify a function_name. If you specify a function_name, the database returns an error to the requestor.
The DROP option only removes the reference to the related UDF from constraint_name and does not affect the actual UDF.