Lists packages or tables associated with the current database.
Database. If implicit connect is enabled, a connection to the default database is established.
>>-LIST--+-PACKAGES-+--+------------------------------+---------> '-TABLES---' | .-USER----------------. | '-FOR--+-ALL-----------------+-' +-SCHEMA--schema-name-+ '-SYSTEM--------------' >--+-------------+--------------------------------------------->< '-SHOW DETAIL-'
The following is sample output from LIST PACKAGES:
Bound Total Isolation
Package Schema Version by sections Valid Format level Blocking
---------- --------- ---------- --------- ------------ ------ ------- --------- --------
F4INS USERA VER1 SNOWBELL 221 Y 0 CS U
F4INS USERA VER2.0 SNOWBELL 201 Y 0 RS U
F4INS USERA VER2.3 SNOWBELL 201 N 3 CS U
F4INS USERA VER2.5 SNOWBELL 201 Y 0 CS U
PKG12 USERA USERA 12 Y 3 RR B
PKG15 USERA USERA 42 Y 3 RR B
SALARY USERT YEAR2000 USERT 15 Y 3 CS N
The following is sample output from LIST TABLES:
Table/View Schema Type Creation time
------------------ ---------------- ---------- ----------------------------
DEPARTMENT SMITH T 1997-02-19-13.32.25.971890
EMP_ACT SMITH T 1997-02-19-13.32.27.851115
EMP_PHOTO SMITH T 1997-02-19-13.32.29.953624
EMP_RESUME SMITH T 1997-02-19-13.32.37.837433
EMPLOYEE SMITH T 1997-02-19-13.32.26.348245
ORG SMITH T 1997-02-19-13.32.24.478021
PROJECT SMITH T 1997-02-19-13.32.29.300304
SALES SMITH T 1997-02-19-13.32.42.973739
STAFF SMITH T 1997-02-19-13.32.25.156337
9 record(s) selected.
LIST PACKAGES and LIST TABLES commands are available to provide a quick interface to the system tables.
select tabname, tabschema, type, create_time
from syscat.tables
order by tabschema, tabname;
select pkgname, pkgschema, pkgversion, unique_id, boundby, total_sect,
valid, format, isolation, blocking
from syscat.packages
order by pkgschema, pkgname, pkgversion;
select tabname, tabschema, type, create_time
from syscat.tables
where tabschema = 'SYSCAT'
order by tabschema, tabname;
select pkgname, pkgschema, pkgversion, unique_id, boundby, total_sect,
valid, format, isolation, blocking
from syscat.packages
where pkgschema = 'NULLID'
order by pkgschema, pkgname, pkgversion;
select tabname, tabschema, type, create_time
from syscat.tables
where tabschema = USER
order by tabschema, tabname;
select pkgname, pkgschema, pkgversion, unique_id, boundby, total_sect,
valid, format, isolation, blocking
from syscat.packages
where pkgschema = USER
order by pkgschema, pkgname, pkgversion;