Every time i try to make a Foreign Key or try to do a ON DELETE CASCADE
I get errors like this :
Error starting at line 9 in command:
CONSTRAINT tp_landlordrole_FK FOREIGN KEY (zillowuseraccountid)
Error report:
Unknown Command
The following is an example of my code
PROMPT 'Creating Table landlordrole'
CREATE TABLE tp_landlordrole
(
landlordroleid NUMBER(20) NOT NULL,
zillowuseraccountid NUMBER(20) NOT NULL,
numberofpropertiesowned Number(6),
CONSTRAINT tp_landlordrole_PK PRIMARY KEY ( landlordroleid ) ) ;
CONSTRAINT tp_landlordrole_FK FOREIGN KEY (zillowuseraccountid)
REFERENCES tp_zillowuseraccount(zillowuseraccountid) ON DELETE CASCADE ;
PROMPT Creating Index 'tp_landlordrole_I'
CREATE INDEX tp_landlordrole_I ON tp_landlordrole
( zillowuseraccountid );
PROMPT 'Creating Sequence tp_landlordroleid_seq for the tp_landlordrole table'
CREATE SEQUENCE tp_landlordroleid_seq START WITH 0 MINVALUE 0 NOCACHE;
Any suggestions are welcome!!