Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with table creation....

Status
Not open for further replies.

StickyBit

Technical User
Jan 4, 2002
264
CA
I'm trying to create the following table using oracle 8.1.7:

CREATE TABLE PRODUCT (
P_CODE VARCHAR(10) NOT NULL UNIQUE,
P_DESCRIPT VARCHAR(35) NOT NULL,
P_INDATE DATE NOT NULL,
P_ONHAND SMALLINT NOT NULL,
P_MIN SMALLINT NOT NULL,
P_PRICE NUMBER(8,2) NOT NULL,
P_DISCOUNT NUMBER(5,2) NOT NULL,
V_CODE INTEGER,
PRIMARY KEY(P_CODE),
FOREIGN KEY(V_CODE) REFERENCES VENDOR
ON DELETE RESTRICT
ON UPDATE CASCADE);

However when I try and create the table I get the following error:

ON DELETE RESTRICT
*
ERROR at line 12:
ORA-00905: missing keyword

What am I doing wrong?

StickyBit.
 
Shouldn't there be a column specified for VENDOR (e.g., FOREIGN KEY(V_CODE) REFERENCES VENDOR(vendor_code))?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top