17.00 - Example: Select a List of Tables and Join Indexes with Single-level Partitioning from IndexConstraints - Teradata Database

Teradata Vantage™ - Data Dictionary

prodname
Advanced SQL Engine
Teradata Database
vrm_release
17.00
created_date
June 2020
category
Administration
Programming Reference
featnum
B035-1092-170K

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;