printIdentifier(key.getName() == null ? getConstraintName(null, table, "FK", getForeignKeyName(key)) : key.getName());
printIdentifier(getForeignKeyName(table, key));
    protected void writeExternalForeignKeyCreateStmt(Database database, Table table, ForeignKey key) throws IOException    {        if (key.getForeignTableName() == null)        {            _log.warn("Foreign key table is null for key " + key);        }        else        {            writeTableAlterStmt(table);            print("ADD CONSTRAINT ");            printIdentifier(key.getName() == null ? getConstraintName(null, table, "FK", getForeignKeyName(key)) : key.getName());            print(" FOREIGN KEY (");            writeLocalReferences(key);            print(") REFERENCES ");            printIdentifier(getTableName(database.findTable(key.getForeignTableName())));            print(" (");            writeForeignReferences(key);            print(")");            printEndOfStatement();        }    }