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 -> DDL Problem

DDL Problem

From: Cameron A. McLellan <cmclell_at_ibm.net>
Date: Wed, 17 Feb 1999 13:31:56 -0700
Message-ID: <36CB273C.462F22DC@ibm.net>


Could someone please let me know why the following DDL statement fails (oracle database)? I am simply trying to create a table, its primary key, and a foreign key in a single statement. Is this allowed?

CREATE TABLE CAM_TEST8 (
    PLCY_ID NUMBER,
    PLCY_PRD_EFF_DT DATE,

    CONSTRAINT CAM_TEST8_PK PRIMARY KEY (PLCY_ID, PLCY_PRD_EFF_DT),
    CONSTRAINT CAM_TEST8_FK FOREIGN KEY (PLCY_ID, PLCY_PRD_EFF_DT)
    REFERENCES CAM_TEST4 (PLCY_ID, PLCY_PRD_EFF_DT)
                                                    );

Any help would be greatly appreciated. Thanks

cmclell_at_ibm.net Received on Wed Feb 17 1999 - 14:31:56 CST

Original text of this message

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