Show information about *FILE or SQL View (QSYS2.SYSTABLES)

By kimot, 24 December, 2022

The SYSTABLES view contains one row for every table, view or alias in the SQL schema, including the tables and views of the SQL catalog.

SELECT table_name, system_table_name, table_schema, table_type, table_owner, column_count, row_length, table_text, long_comment, file_type
FROM QSYS2.SYSTABLES
WHERE table_name = 'USER_INFO' AND table_schema='QSYS2'
TABLE_NAME    SYSTEM_TABLE_NAME    TABLE_SCHEMA    TABLE_TYPE    TABLE_OWNER    COLUMN_COUNT    ROW_LENGTH    TABLE_TEXT    LONG_COMMENT         FILE_TYPE
USER_INFO     USER_INFO            QSYS2           V             QSYS           80              6709                        DB2 FOR IBM i ...    D