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
efficient), while for primary key and unique constraints oracle will create
indexes, if you don't specify "using index" clause.

Igor Neyman, OCP DBA
[EMAIL PROTECTED]



----- Original Message -----
To: "Multiple recipients of list ORACLE-L" <[EMAIL PROTECTED]>
Sent: Wednesday, March 26, 2003 3:03 PM


> 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, sourcefiscalyear)
>    using index tablespace index73
>    pctfree 5)
> /
>
> This produced the error:
>
> ERROR at line 5:
> ORA-00907: missing right parenthesis
>
> Can someone spot what I'm missing? This is Oracle 8.1.6.
>
> Dennis Williams
> DBA, 40%OCP, 100% DBA
> Lifetouch, Inc.
> [EMAIL PROTECTED]
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.net
> --
> Author: DENNIS WILLIAMS
>   INET: [EMAIL PROTECTED]
>
> Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
> San Diego, California        -- Mailing list and web hosting services
> ---------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from).  You may
> also send the HELP command for other information (like subscribing).
>
>


-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Igor Neyman
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to