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.

有帮助吗?

解决方案 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>

其他提示

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top