Bryan Pendleton <[EMAIL PROTECTED]> writes:
>>> insert into greetings(ch) values ('bonjour');
>> ij> insert into greetings values ('bonjour');
>
> These two don't look identical. The second one is missing (ch).
Thanks Bryan! I think I was blind-sided by my expectation here.
I am puzzled by the documentation's mention of 0 as a legal increment
value:
> By default, the initial value of an identity column is 1, and the
> amount of the increment is 1. You can specify non-default values for
> both the initial value and the interval amount when you define the
> column with the key words STARTS WITH and INCREMENT BY. And if you
> specify a negative number for the increment value, Derby decrements
> the value with each insert. If this value is 0, or positive, Derby
******************
> increments the value with each insert.
When I try it, 0 is flagged as illegal, as I would expect:
ij> create table f (i int generated by default as identity (start with 1,
increment by 0), j int);
ERROR 42Z21: Invalid increment specified for identity for column 'I'. Increment
cannot be zero.
A bug, or am I missing something?
Dag