Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

constraint - primary key + unique key

redologgerMay 6 2012 — edited May 8 2012
hi guys,

just want to find out this documentation:

>
When you create a primary-key constraint, Oracle also creates a unique index with the same name as the
constraint.
>
create table dept(
dept_id number,
dept_desc varchar2(30),
constraint dept_pk primary key (dept_id)
using index tablespace prod_index);

SQL> select constraint_name from dba_constraints
  2  where table_name='DEPT'
  3  and constraint_type='U';

no rows selected
I tested out seem that the saying is not correct. Please further advice.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 5 2012
Added on May 6 2012
23 comments
1,300 views