Frage

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.

War es hilfreich?

Lösung 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>

Andere Tipps

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top