Aswini
Aswini

Reputation: 81

Where will the tablespace be stored?

I am creating a table with tablespace:

CREATE TABLE SALARY.....
     IN ACCOUNTING INDEX IN ACCOUNT_IDX 

Where will the Accounting and Account_IDX be created?

Upvotes: 1

Views: 223

Answers (1)

Michael Sharek
Michael Sharek

Reputation: 5069

The script that you have above will create SALARY in the ACCOUNTING tablespace, with indexes for that table in ACCOUNT_IDX tablespace.

The ACCOUNTING and ACCOUNT_IDX tablespaces need to be created in a separate script that has CREATE TABLESPACE statements.

If you look at the syntax for CREATE TABLESPACE, the USING part of the statement will tell DB2 where to put the files for the tablespace.

DB2 Create Tablespace Reference

Upvotes: 2

Related Questions