Column and other table metadata information in Teradata dbc tables

All Teradata system tables are stored under DBC schema.


For columns, it is dbc.columns

select * from dbc.columns

For views, it is dbc.tables with a filter on a column something named table_type 'V' (where V stands for Views)

select * from dbc.tables where tablekind = 'V'

In Teradata DBC.Tables contains many of the objects that exist on the system. (e.g. Stored Procedures, UDF, Triggers, Macros, Views, Tables, Hash Index, Join Index, etc.) The column Table Kind is used to identify the type of object.

SELECT *
FROM DBC.TABLES
WHERE TABLEKIND = '<see below>'

A = Aggregate Function
B = Combined Aggregate Function and ordered analytical function
D = JAR
E = External Stored Procedure
F = Standard Function
G = Trigger
H = Instance or Constructor Method
I = Join Index
J = Journal
M = Macro
N = Hash Index
O = No Primary Index (Table)
P = Stored Procedure
Q = Queue Table
R = Table Function
S = Ordered Analytical Function
T = Table
U = User-defined data type
V = View
X = Authorization
Y = GLOP Set


dan-irving

posted on 09 Jun 18

Enjoy great content like this and a lot more !

Signup for a free account to write a post / comment / upvote posts. Its simple and takes less than 5 seconds