If this is your first visit, be sure to check out the FAQ by clicking the link above.
You may have to register before you can post: click the register link above to proceed.
To start viewing messages, select the forum that you want to visit from the selection below.
A CREATE TABLE....PRIMARY KEY... done on UDB DB2 on Windows, automatically creates a unique index on the primary key. How can you make the primary index a clustered index ?
In the os/390 world, the CREATE TABLE would put the table in a incomplete state. It would be marked as usable only after your create the unique index on the primary key cols. Since it is a seperate create unique index DDL, it was easy to specify the CLUSTER option.
1. Create the table without RI (no primary key)
2. Create a unique index on the primary key columns and make it clustered.
3. Create the Primary Key (DB2 will use the index already created)
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390