17.10 - Example: Select a List of Tables and Join Indexes with Single-level Partitioning from IndexConstraints - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - Data Dictionary

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Administration
Programming Reference
Publication ID
B035-1092-171K
Language
English (United States)

The following query retrieves a list of tables and join indexes that have single-level partitioning:

SELECT DatabaseName, TableName (TITLE 'Table/Join Index Name')
   FROM DBC.IndexConstraints
   WHERE ConstraintType = 'Q'
   AND (  SUBSTRING(ConstraintText FROM 1 FOR 13) < 'CHECK (/*02*/'
     OR SUBSTRING(ConstraintText FROM 1 FOR 13) > 'CHECK (/*15*/')
   ORDER BY DatabaseName, TableName;