Skip to Main Content

SQL & PL/SQL

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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

referenced field as a primary key ?

B. YoussefMay 25 2009 — edited May 25 2009
hello all

plz,
can we put a referenced field as a primary key?

i have this type :

c+reate type tservicep as object (+
+ refnump ref tprofesseurp,+
+ refnomc ref tclassep,+
+ nbh integer+
+ );+

and i want to create the table of this type
when do it with :

CREATE TABLE SERVICEP OF TSERVICEP (PRIMARY KEY (refnumP,refnomC));

I get this error :

ERROR at line 1:
ORA-02329: column of datatype REF cannot be unique or a primary key



thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 22 2009
Added on May 25 2009
1 comment
256 views