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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Syntax for foreign key

RE: Syntax for foreign key

From: Mercadante, Thomas F <NDATFM_at_labor.state.ny.us>
Date: Wed, 26 Mar 2003 12:47:03 -0800
Message-ID: <F001.00573A93.20030326124703@fatcity.com>


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

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.
dwilliams_at_lifetouch.com
--

Please see the official ORACLE-L FAQ: http://www.orafaq.net
--

Author: DENNIS WILLIAMS
  INET: DWILLIAMS_at_LIFETOUCH.COM

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: ListGuru_at_fatcity.com (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: Mercadante, Thomas F
  INET: NDATFM_at_labor.state.ny.us
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: ListGuru_at_fatcity.com (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). Received on Wed Mar 26 2003 - 14:47:03 CST

Original text of this message

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