Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Combined Primary Key
Use them all the time, which is very handy for importing from more than one
source into an Oracle table.
Hope not to incite a flame war, but I think anything you can do in MS SQL Server, you can do better in Oracle.
"Niall Litchfield" <n-litchfield_at_audit-commission.gov.uk> wrote in message
news:3dcfbd65$0$1289$ed9e5944_at_reading.news.pipex.net...
> The simple answer is yes.
>
> SQL> @create_composite_primary_key_eg
>
> Table created.
>
> SQL> ;
> 1 CREATE TABLE tab1(
> 2 region_id number,
> 3 order_id number,
> 4 CONSTRAINT pk_tab1 PRIMARY KEY( region_id,order_id))
> 5* TABLESPACE users
> SQL>
>
>
> "PABLO" <pchemes_at_inalambrik.com.ar> wrote in message
> news:fb04eea9.0211110607.663a5407_at_posting.google.com...
> > Hi, I wonder if I can create in Oracle a Primary Key composed by 2
> > fields of the table, like I do in MS SQL Server.
> >
> > Thanks,
> >
> > Pablo
>
>
Received on Mon Nov 11 2002 - 11:38:21 CST