Hi,

> sequences essentially
> exist in their own namespace anyway

Yes, but sequence names could collide with other sequence names. One
solution is to use some rule like: AUTO_<tableName> or
AUTO_<schemaName>_<tableName>. This is how it worked in H2 up to some
point. Until it turned out it's a problem sometimes (I don't remember
the details, but it had to do with renaming objects, and RUNSCRIPT to
import data from another database). Anyway, now H2 uses the prefix
'SYSTEM_SEQUENCE' and a UUID. Example:
SYSTEM_SEQUENCE_7167FEA7_4DB8_44CE_92E9_0CE9FB883403. A collision is
very very unlikely. See also
http://www.h2database.com/html/advanced.html#uuid

> "ease of use" feature

There is CALL IDENTITY()
http://www.h2database.com/html/functions.html#identity

> Perhaps you might consider adding alternate syntax of
> AUTO_INCREMENT[('sequencename')], which would essentially allow
> creation of a sequence within the create table, but still retain the
> benefit
> of not having to deal with the type differences of a explicit
> sequence.

There is a 'standard' way to do that:
create sequence abc;
create table test(id bigint default next value for abc);

Regards,
Thomas

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to