By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,237 Members | 1,224 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,237 IT Pros & Developers. It's quick & easy.

DB2 temporary tables help

P: 1
Is it always necessary to have a primary key for a temporary table?
Oct 2 '06 #1
Share this Question
Share on Google+
1 Reply

P: 5
Primary keys are never required in DB2.

The only thing that a "primary key" clause gives you is that DB2 will create a unique index to support the unique rule specified in the primary key clause.

You could do the same by defining your own unique index (without using the "primary key" clause).

Or, as your question asks, you can create any table (temporary or otherwise) without indexes. Indexes are entirly optional.

Oct 18 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.