1 Reply Latest reply on Feb 25, 2019 11:42 AM by Philip Stoyanov-Oracle

    Bypass Object Creation in DDL if it already exists

    RRAJ

      I have added this in the Before Create script under "Table DDL Transformations"

       

      ddl = "IF NOT EXISTS (SELECT * FROM sysobjects WHERE name= '"  + table.getLongName()   + "')";

      ddlStatementsList.add(new java.lang.String(ddl));

       

      As expected, it seems to apply only to the tables.

       

      However, I have a bunch of ALTER table statements following the table creation for Primary and Foreign keys.

      I do not want them to fail.

      Is there a way to generate such conditions for other artifacts in Oracle SDDM?