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

Primary key and Unique indexes in UDB Vs Oracle....

P: n/a
Here is the scenario:

1. I create a unique index on a table.
2. I create a primary key on that table with same columns as the ones in
the unique index by Alter table add primary key statement. The primary key
defined 'uses' the unique index created in step 1 to enfore uniqueness.
3. I drop the primary key. (Alter table drop primary key).

After step 3:

- In UDB, the unique index remains and only the primary key gets dropped.
- In Oracle, the Unique index also gets dropped. Why?? Doesn't make sense
to me but guess, that is because I have a UDB background. Could someone
explain the logic behind unique index getting 'auto dropped'?

TIA
Raquel.

Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Raquel wrote:
Here is the scenario:

1. I create a unique index on a table.
2. I create a primary key on that table with same columns as the ones in
the unique index by Alter table add primary key statement. The primary key
defined 'uses' the unique index created in step 1 to enfore uniqueness.
3. I drop the primary key. (Alter table drop primary key).

After step 3:

- In UDB, the unique index remains and only the primary key gets dropped.
- In Oracle, the Unique index also gets dropped. Why?? Doesn't make sense
to me but guess, that is because I have a UDB background. Could someone
explain the logic behind unique index getting 'auto dropped'?


You might want to ask that in an Oracle newsgroup.

--
Knut Stolze
Information Integration
IBM Germany / University of Jena
Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.