db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel John Debrunner <...@apache.org>
Subject Re: identity_val_local() for multi-row insert
Date Thu, 19 Apr 2007 17:22:47 GMT
Haolan Qin wrote:
> Hi there,
> The documentation says the following.
> “The result of the function is not affected by the following:
>     * A single row INSERT statement with a VALUES clause for a table
>       without an identity column
>     * A multiple row INSERT statement with a VALUES clause
>     * An INSERT statement with a fullselect”
> Is this a “feature”? If so what’s the rationale behind it? If it’s not a 
> feature then I assume it’s some sort of a bug that’s really hard to fix? 
> Is there any workaround at all (to get the correct identity value after 
> an “insert into…select…”)?

Which is the "correct" identity value if multiple rows were inserted, 
since in SQL no ordering is defined here?


View raw message