I\'m just looking for a simple query to select all the table names for a given schema.
For example, our DB has over 100 tables and I need to find any table that cont
You can also get the table names simply by typing LIST TABLES in DB2
SELECT
name
FROM
SYSIBM.SYSTABLES
WHERE
type = 'T'
AND
creator = 'MySchema'
AND
name LIKE 'book_%';
You should try this:
select TABNAME from syscat.tables where tabschema = 'yourschemaname'";
Using the DB2 commands (no SQL) there is the possibility of executing
db2 LIST TABLES FOR ALL
This shows all the tables in all the schemas in the database.
ref: show all tables in DB2 using the LIST command
DB2 LIST TABLES FOR SCHEMA <schema_name>
select name from sysibm.systables
where name like '%ISP%'
and type = 'T'