Ok now we are talking!

But still not exactly what I want
Continuing your example from below:

insert into a values(13);
insert into b values(13);
select * from a;
select * from b;

And we realize that both table a and b contain id value 13.
What my distributed key does is that it guards the the uniqueness of the distributed key.

So statement insert into b values(13) would throw a unique key violation exception.
That's the main function of a key (to guard it's uniqueness).

- Rami

18.10.2010 21:37, Thomas Mueller kirjoitti:
Hi,

To solve this problem, there is another undocumented feature:

drop all objects;
create sequence seq;
create table a(x int default next value for seq sequence seq primary key);
create table b(y int default next value for seq sequence seq primary key);
insert into a values(1);
insert into a values(default);
insert into b values(3);
insert into b values(default);
insert into a values(default);
select * from a;
select * from b;

Those features are not documented because I don't want people to rely
on them too much. They are non-standard, and only needed in very
specific cases.

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