How to get entire database DDL structure in TeraData

General
Enthusiast

How to get entire database DDL structure in TeraData

Hi,

Can u tell how to get entire database DDL structure in Teradata?

6 REPLIES
Senior Supporter

Re: How to get entire database DDL structure in TeraData

Can you explain in a bit more detail what you want?

All DDLs of a database?

Enthusiast

Re: How to get entire database DDL structure in TeraData

I need all the dabase Structure means with in database tables structure like that i need entire database structure at a time.

Enthusiast

Re: How to get entire database DDL structure in TeraData

Run the following Query for the database for which you want to get the DDL

sel 'show table ' || databasename   ||'.'||   tablename ||';'  from dbc.tables where databasename = 'dbname' and tablekind = 'T';

sel 'show view ' || databasename   ||'.'||   tablename ||';'  from dbc.tables where databasename = 'dbname' and tablekind = 'V'

you will get the output as follows which can be run on the system to get the DDL:

show table dbname.table1;

May be this can help you for the moment.

Enthusiast

Re: How to get entire database DDL structure in TeraData

Enthusiast

Re: How to get entire database DDL structure in TeraData

It is better to go application by application which is meanigfully represented in database hierarchy rather than getting the entire definitions in one go. Making sense for learning also would be difficult.

Enthusiast

Re: How to get entire database DDL structure in TeraData

But request text will give recent ddl only (it can be create ddl or alter ddl)

be care full with this