TITLERE: Syntax for foreign key/TITLE
META content=MSHTML 5.50.4807.2300 name=GENERATOR/HEAD
BODY
DIVFONT face=Arial color=#ff size=2/FONTnbsp;/DIV
BLOCKQUOTE dir=ltr
style=PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #ff 2px solid;
MARGIN-RIGHT: 0px
DIV class=OutlookMessageHeader
Title: RE: Syntax for foreign key
(see answer below)
-Original Message-
From: Robson, Peter [mailto:[EMAIL PROTECTED]]
-Original Message-
Indexes are only automatically created to enforce primary key
and unique
constraints.
If you want an index to match
I'm trying to add a foreign key constraint to a table, and specify the
tablespace and pctfree. Here is the syntax I'm using:
alter table jobproductoutrigger add (
constraint fk_jobprodu_currjobfa_currjobf foreign key (
jobnbr, sourcefiscalyear )
references currjobfact (jobnbr,
Dennis,
I don't think you can add an index this way. I've always had to add the
index separately. It would be great if this was possible.
Tom Mercadante
Oracle Certified Professional
-Original Message-
Sent: Wednesday, March 26, 2003 3:04 PM
To: Multiple recipients of list ORACLE-L
Dennis...
I'm trying to add a foreign key constraint to a table, and specify the
tablespace and pctfree. Here is the syntax I'm using:
alter table jobproductoutrigger add (
constraint fk_jobprodu_currjobfa_currjobf foreign key (
jobnbr, sourcefiscalyear )
references currjobfact
Dennis,
I don't think, you can use using index clause, when adding FOREIGN KEY
constraint, you can use it though with PRIMARY KEY and UNIQUE constraints.
For FOREIGN KEY constraint you should create index with separate DDL.
Probably, because foreign key can exist without index (though it's not
Title: RE: Syntax for foreign key
Indexes are only automatically created to enforce primary key and unique constraints.
If you want an index to match the columns of a foreign key constraint, you will have to do it separately.
P.S. If you already have a non-unique index on the PK or unique