Question

Is there a statement that will let me view all the tables on a database, their respective column names, and any other pertinent data?

I imagine I have to query the system catalogs? I am new to DB2 and unsure of how to proceed.

Was it helpful?

Solution 2

Connect to the database:

db2 connect to <database-name>

List all tables:

db2 list tables for all

To list all tables in selected schema, use:

db2 list tables for schema <schema-name>

To describe a table, type:

db2 describe table <table-schema.table-name>

OTHER TIPS

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top