Hi,

> > Why not? I think a sequence can do all that.
> No it can't.

Why can't you use a sequence? As in:

create sequence seq;
create table a(x int default next value for seq);
create table b(y int default next value for seq);

This assumes you didn't specify the value when inserting into the
table, or used the term "default" (as documented):

insert into a values(default);
update a set x = default;

There is also a non-standard way to automatically convert null to default:

create table a(x int default next value for seq null_to_default);

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