Reference Manual
CHAPTER 16. System Views
CREATE VIEW SYS.SYSCATALOG ( creator,
tname, dbspacename, tabletype, ncols,
primary_key, "check", remarks )
AS
SELECT ( SELECT user_name FROM SYS.SYSUSERPERM
WHERE user_id = SYSTABLE.creator ),
table_name,
( SELECT dbspace_name from SYS.SYSFILE
WHERE file_id = SYSTABLE.file_id ),
IF table_type='BASE' THEN 'TABLE'
ELSE table_type ENDIF,
( SELECT count(*) FROM SYS.SYSCOLUMN
WHERE table_id = SYSTABLE.table_id ),
IF primary_root = 0 THEN 'N' ELSE 'Y' ENDIF,
IF table_type <> VIEW' THEN view_def ENDIF,
remarks
FROM SYS.SYSTABLE
Lists all the tables and views from SYSTABLE in a readable format.