Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Combined Primary Key

Re: Combined Primary Key

From: Niall Litchfield <n-litchfield_at_audit-commission.gov.uk>
Date: Mon, 11 Nov 2002 14:23:32 -0000
Message-ID: <3dcfbd65$0$1289$ed9e5944@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 - 08:23:32 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US