Example: SHOW CONSTRAINT - Teradata Vantage - Analytics Database

SQL Data Definition Language Syntax and Examples

Deployment
VantageCloud
VantageCore
Edition
VMware
Enterprise
IntelliFlex
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
ft:locale
en-US
ft:lastEdition
2025-11-22
dita:mapPath
jco1628111346878.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
mdr1472255012272
lifecycle
latest
Product Category
Teradata Vantage™

This example shows a valid case of SHOW CONSTRAINT for a row-level security constraint.

The constraint is defined using the following row-level security constraint UDF.

     CREATE FUNCTION SYSLIB.add_func (
     CURRENT_SESSION SMALLINT)
     RETURNS SMALLINT
     LANGUAGE C
     NO SQL
     PARAMETER STYLE TD_GENERAL
     EXTERNAL NAME 'CS!add_func!/home/xiaoy/test/showtab/constraint/
                    add_func.c';

The constraint is defined as follows.

     CREATE CONSTRAINT c1 SMALLINT, NOT NULL,
     VALUES (a:1),
     INSERT SYSLIB.add_func;

A SHOW CONSTRAINT request made for row-level security constraint c1 returns the DDL for its definition as follows.

     SHOW CONSTRAINT c1;

Result:

           *** Text of DDL statement returned.
           *** Total elapsed time was 1 second.
          -------------------------------------------------------------
          CREATE CONSTRAINT c1 SMALLINT, NOT NULL,
          VALUES (a:1),
          INSERT SYSLIB.add_func;