Tuesday, 29 October 2024

Dropping all tables from a specific schema

Dropping all tables from a specific schema

Use this query to select and drop all tables of a schema

SCHEMA NAME = TEST
db2 -x "select 'drop table '||rtrim(tabschema)||'.'||rtrim(tabname) from syscat.tables where tabschema = 'TEST'"

No comments:

Post a Comment