开发者

How to access Library, File, and Field descriptions in DB2?

开发者 https://www.devze.com 2023-04-08 14:05 出处:网络
I would like to write a query that uses the IBM DB2 system tables (ex. SYSIBM) to pull a query that exports the following:

I would like to write a query that uses the IBM DB2 system tables (ex. SYSIBM) to pull a query that exports the following:

LIBRARY_NAME, LIBRARY_DESC, FILE_NAME, FILE_DESC, FIELD_NAME, FIELD_DESC

I can access the d开发者_运维问答escriptions via the UI, but wanted to generate a dynamic query.

Thanks.


Along with SYSTABLES and SYSCOLUMNS, there is also a SYSSCHEMAS which appears to contain the data you need. Please note that accessing this information through QSYS2 will restrict rows returned to those objects with which you have some access - the SYSIBM schema appears to disregard this (check the reference - for V6R1 it's about page 1267).

You also shouldn't need to retrieve this with a dynamic query - static with host variables (if necessary) will work just fine.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号