All Forums General
raj922 14 posts Joined 11/11
28 Nov 2011
How to get entire database DDL structure in TeraData

Hi,

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

ulrich 816 posts Joined 09/09
28 Nov 2011

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

All DDLs of a database?

feel free to donate bitcoin:12kgAUHFUqvG2sQgaRBXFhCwyf9HXdkGud

raj922 14 posts Joined 11/11
29 Nov 2011

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

29 Nov 2011

 

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.

 

 

Regards
Chanchal Preet Singh

Jimm 298 posts Joined 09/07
03 May 2012

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.

Ramakrishna Vedantam, Tata consultancy services, Hyderabad

malli 10 posts Joined 08/12
05 Feb 2013

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

You must sign in to leave a comment.