Quantcast
Channel: Teradata Forums - Database
Viewing all articles
Browse latest Browse all 14773

Select statements to get metadata - response (1) by Qaisar Aftab Kiani

$
0
0

That is a lot of information for a single post :)
Anyways, Teradata maintains quite a detailed information about its objects (databases, tables, views, columns, datatypes etc). You can start with dbc tables like dbc.database, dbc.tables, dbc.columns etc. All the information will be available there. Most of them are flags, so you probably need to look for them as what they mean (e.g. In dbc.tables - tabletype T defines table, V means View, M means Macro etc.)
There is no concept of schema in terdata.
Like any other RDBMS, the resultset of a query is always random. So skipping first 100 records is not possible. But you can add SAMPLE clause to fetch pure sampled data from the db.
List of keywords, all the ANSI standard keywords should be there plus TD Extension keywords which needs to be googled i guess...
For the auto-generated values, there are two ways to setup "GENERATED ALWAYS"& "GENERATED BY DEFAUT"... Read through the teradata identity columns. But either case, you can't always guarantee the next value system will be using for auto-generated values rather the uniqueness is maintained till the limits are reached depending on the way the columns are defined...


Viewing all articles
Browse latest Browse all 14773

Trending Articles