String columnName  = getColumnName(columns[idx]); String triggerName = getConstraintName("trg", table, columns[idx].getName(), null);     print("CREATE OR REPLACE TRIGGER "); printIdentifier(triggerName); print(" BEFORE INSERT ON "); printIdentifier(getTableName(table)); print(" FOR EACH ROW WHEN (new."); printIdentifier(columnName); println(" IS NULL)"); print("BEGIN SELECT "); printIdentifier(getConstraintName("seq", table, columns[idx].getName(), null)); print(".nextval INTO :new."); printIdentifier(columnName); print(" FROM dual"); print(getPlatformInfo().getSqlCommandDelimiter()); print(" END");    print(getPlatformInfo().getSqlCommandDelimiter()); printEndOfStatement();
createAutoIncrementTrigger(table, columns[idx]);
    public void createTable(Database database, Table table, Map parameters) throws IOException    {        // lets create any sequences        Column[] columns = table.getAutoIncrementColumns();        for (int idx = 0; idx < columns.length; idx++)        {            print("CREATE SEQUENCE ");            printIdentifier(getConstraintName("seq", table, columns[idx].getName(), null));            printEndOfStatement();        }        super.createTable(database, table, parameters);        for (int idx = 0; idx < columns.length; idx++)        {            String columnName  = getColumnName(columns[idx]);            String triggerName = getConstraintName("trg", table, columns[idx].getName(), null);            // note that the BEGIN ... SELECT ... END; is all in one line and does            // not contain a semicolon except for the END-one            // this way, the tokenizer will not split the statement before the END            print("CREATE OR REPLACE TRIGGER ");            printIdentifier(triggerName);            print(" BEFORE INSERT ON ");            printIdentifier(getTableName(table));            print(" FOR EACH ROW WHEN (new.");            printIdentifier(columnName);            println(" IS NULL)");            print("BEGIN SELECT ");            printIdentifier(getConstraintName("seq", table, columns[idx].getName(), null));            print(".nextval INTO :new.");            printIdentifier(columnName);            print(" FROM dual");            print(getPlatformInfo().getSqlCommandDelimiter());            print(" END");            // It is important that there is a semicolon at the end of the statement (or more            // precisely, at the end of the PL/SQL block), and thus we put two semicolons here            // because the tokenizer will remove the one at the end            print(getPlatformInfo().getSqlCommandDelimiter());            printEndOfStatement();        }    }