| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
|  |  | |||
Home -> Community -> Usenet -> c.d.o.tools -> Re: object question
I saw from the documentation saying that you cannot define primary key or unique constraints on a column defined as 'ref'. Is it true? Anyway I tried to create a unique index on that column and it works.
<maaher_at_my-deja.com> wrote in message news:8jffa9$4us$1_at_nnrp1.deja.com...
> In article <Dhw65.30343$7I1.545495_at_news1.rdc2.on.home.com>,
>   "Francis Wong" <wongfrancis_at_home.com> wrote:
> > I create a table using the following command:
> >
> > create table xxxxx (
> >     client_info           ref client_objtyp scope is client_objtab
 not null,
> >     ...
> >     ...
> > );
> >
> > However, I know that client_info is also unique in the table xxxxx.
 How can
> > I put a constraint to make the column unique?
> >
> >
> Hi Francis,
> this is the SQL-command to add an unique constraint:
>  alter table xxxx
>  add constraint unq_cl_info UNIQUE(client_info);
>
> >
|  |  |