Domanda

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.

È stato utile?

Soluzione 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>

Altri suggerimenti

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top