0

I need DB2 equivalent of this query . Any help is appreciated. I found few links but its confusing which table to query for db2.

select table_name 
from all_catalog 
where TABLE_TYPE = 'CATALOG'

https://developer.ibm.com/articles/dm-0411melnyk/

devs
  • 37
  • 1
  • 6
  • DB2 doesn't seem to have an exact equivalent of ALL_CATALOG. So you'll need one or more of the views in the QSYS2 schema. [Find out more](https://www.ibm.com/support/knowledgecenter/en/ssw_ibm_i_71/db2/rbafzcatalogtbls.htm). – APC Feb 03 '20 at 15:14
  • depends on the Platform and version of Db2... – Charles Feb 03 '20 at 17:55
  • Try the answer to "DB2 Query to retrieve all table names for a given schema" here https://stackoverflow.com/a/52322317/9525344 – Paul Vernon Feb 04 '20 at 10:51

1 Answers1

0

Db2 offers an Oracle compatibility mode. You can switch on views similar to the Oracle data dictionary. It includes ALL_CATALOG, but I don't have personal experience with it.

data_henrik
  • 16,724
  • 2
  • 28
  • 49