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 -> Missing right parenthesis

Missing right parenthesis

From: Jon <jhoug2_at_hotmail.com>
Date: 10 Jul 2003 11:36:14 -0700
Message-ID: <24204a6.0307101036.647a4e50@posting.google.com>


Hi,

I have a SQL script which contain SQL statements very similar to the example below that create and modify a number of tables. The SQL statement below is giving me a problem.

CREATE TABLE meta_packet
(

        id              NUMBER,
        s9_pkt_id       NUMBER(20),
        ts              TIMESTAMP(9),
        inbound         NUMBER(1),
        ether_type      NUMBER(5),
        ip_proto        NUMBER(3),
        accept          NUMBER(3),
        mac_pair_id     NUMBER,
        ether_body_id   NUMBER,
        ip_body_id      NUMBER,
        conv_pair_id    NUMBER,
        payload_id      NUMBER

);
ALTER TABLE meta_packet ADD
(
        CONSTRAINT meta_packet_pk PRIMARY KEY (id),
        CONSTRAINT mac_pair_fk FOREIGN KEY (mac_pair_id)
                REFERENCES mac_addr_pair (id),
        CONSTRAINT payload_fk FOREIGN KEY (payload_id)
                REFERENCES payload (id)

USING INDEX TABLESPACE indx);

Specifically, the problem is in the "ALTER TABLE meta_packet ADD" portion of this statement. When I execute the ALTER TABLE portion of the above statement from the SQL> prompt as follows, I am getting this error:

SQL> ALTER TABLE meta_packet ADD
  2 (
  3 CONSTRAINT meta_packet_pk PRIMARY KEY (id),   4 CONSTRAINT mac_pair_fk FOREIGN KEY (mac_pair_id)   5 REFERENCES mac_addr_pair (id),
  6 CONSTRAINT payload_fk FOREIGN KEY (payload_id)   7 REFERENCES payload (id)
  8 USING INDEX TABLESPACE indx);
USING INDEX TABLESPACE indx)
*
ERROR at line 8:
ORA-00907: missing right parenthesis

Is there a syntax problem, are there too many CONSTRAINT/REFERENCES statements or are the CONSTRAINT/REFERENCES statements in the wrong order? I am at a loss to understand the problem. Any ideas?

Thanks, Received on Thu Jul 10 2003 - 13:36:14 CDT

Original text of this message

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