result.append("CURRVAL("); result.append(getDelimitedIdentifier(getConstraintName(null, table, columns[idx].getName(), "seq"))); result.append(") AS ");
result.append("currval('"); result.append(getConstraintName(null, table, columns[idx].getName(), "seq")); result.append("') AS ");
    public String getSelectLastInsertId(Table table)    {        Column[] columns = table.getAutoIncrementColumns();        if (columns.length == 0)        {            return null;        }        else        {            StringBuffer result = new StringBuffer();                result.append("SELECT ");            for (int idx = 0; idx < columns.length; idx++)            {                if (idx > 0)                {                    result.append(", ");                }                result.append("CURRVAL(");                result.append(getDelimitedIdentifier(getConstraintName(null, table, columns[idx].getName(), "seq")));                result.append(") AS ");                result.append(getDelimitedIdentifier(columns[idx].getName()));            }            return result.toString();        }    }