Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to see DDL for an existing table/view

Status
Not open for further replies.

portagal

Programmer
Jul 28, 2004
32
0
0
CA
I wonder if there is any way to find out about the defenition of a table, I have some tables and views which are based on other tables and views on different databases I need to see how they have been defined.
I am very new in DB2 actually in databases, so i appriciate any help.

thanks
 
check out db2look utility.

e.g. db2look -d dbname -e

just entering
>db2look
shows you all the options.

(I guess you are not asking about the host ...)

Juliane
 
For individual tables, use command:
describe table table-name
 
db2look -e -d datbasename -z db2prod -tw tablerequired -i myusername -w mypassword -a

This will show the full ddl for the table
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top