2 Replies Latest reply: Sep 12, 2012 6:08 PM by Beth Roeser-Oracle RSS

    Picture for "CREATE TABLE"'s references_clause in 11gR2 docs not correct

    blama
      Hi,

      please see these working SQL statements.
      CREATE TABLE testtable
        (
          pk_c1  NUMBER NOT NULL,
          pk_c2  NUMBER NOT NULL,
          fk1_c1 NUMBER,
          fk1_c2 NUMBER,
          fk2_c1 NUMBER,
          fk2_c2 NUMBER,
          CONSTRAINT testtable_pk PRIMARY KEY (pk_c1, pk_c2) ENABLE,
          CONSTRAINT testtable_fk1 FOREIGN KEY (fk1_c1, fk1_c2) REFERENCES testtable (pk_c1, pk_c2) ENABLE
        ) ;
      
      ALTER TABLE testtable ADD CONSTRAINT testtable_fk2 FOREIGN KEY (fk2_c1, fk2_c2) REFERENCES testtable (pk_c1, pk_c2) ENABLE;
      
      DROP TABLE testtable;
      The "references_clause"s for inline_constraint and out_of_line_constraint in "CREATE TABLE" and "ALTER TABLE" all link to this doc:
      http://docs.oracle.com/cd/E11882_01/server.112/e26088/clauses002.htm#CJAIHHGC

      The text-description for the picture for the references_clause is
      [ schema. ] { object_table | view }
        [ (column [, column ]...) ]
        [ON DELETE { CASCADE | SET NULL } ]
        [ constraint_state ]
      but the picture does not show the " [, column ]..."-part.

      Best regards,
      Blama