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