Missing left parenthesis
351091Jul 10 2003 — edited Jul 10 2003Hi,
The following SQL statement is an excerpt from a SQL script that creates and modifies tables and 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. I'm executing the ALTER TABLE portion of the statement from the SQL> prompt as follows:
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
9 );
USING INDEX TABLESPACE indx
*
ERROR at line 8:
ORA-00907: missing right parenthesis
As you can see in the above example, this is the error I am receiving and am at a loss to understand what is causing this error. All of the other CREATE TABLE and ALTER TABLE statements in the SQL script are pretty much the same as this one and they all execute normally with no problems at all. Any ideas as to what may be the problem?
Thanks,