15.10 - ADD - Teradata Database

Teradata Database SQL Data Definition Language Syntax and Examples

prodname
Teradata Database
vrm_release
15.10
created_date
December 2015
category
Programming Reference
featnum
B035-1144-151K

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.

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.

Example: Adding a DELETE Security Policy to a Constraint Object

This ALTER CONSTRAINT example adds a DELETE security policy UDF to the classification_level constraint object.

     ALTER CONSTRAINT classification_level
     AS FUNCTION ADD DELETE SYSLIB.deletelevel;

Example: Adding a New Set of Name:Value Pairs to a Constraint Object

This ALTER CONSTRAINT example adds the specified set of name:value pairs to the classification_level constraint object and deletes all of the old name:value pairs.

     ALTER CONSTRAINT classification_level
     AS VALUES (topsecret:4, secret:3, confidential:2, unclassified:1);