Hi,
Version 1.3.160:
create table node (id int auto_increment primary key, name varchar
unique, parent_id int references node(id));
alter table node add check (2 > (select count(id) from node where
parent_id is null)) check;
insert into node (name) values ('v1');
insert into node (name) values ('v2');
select * from node;
I expect the second insert to fail, since it will cause 2 rows with NULL
parent_id's. Is this a bug or is my expectation wrong?
Thanks,
Jesse
--
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.