Find DB2 Table Tablespace: Quick SQL Guide

To view the tablespace where a table is located, you can use the following SQL statement:

SELECT TBNAME, TBSPACE
FROM SYSCAT.TABLES
WHERE TABSCHEMA = 'YourSchema'
AND TBNAME = 'YourTable';

Replace YourSchema with the name of the schema where the table is located, and replace YourTable with the name of the table you want to view, then execute the query to obtain the tablespace where the table is located.

bannerAds