I am starting in H2, because I'm planning on using it in an application in 
java swing that i'm starting to develop.
I created a database with two tables (A and B), where B have foreign key of 
A. To my surprise, I'm managing to eliminate (DROP TABLE) the table A 
without any H2 error message, even with SET REFERENTIAL_INTEGRITY TRUE .
Where am I going wrong?

I'm using h2-1.4.187.jar and when the browser opens, I put the following 
script to run and I get no error.

Thanks for attention.


set referential_integrity true;

create table A (id integer not null primary key, name varchar(50));
create table B (id integer not null primary key, name varchar(50), idA 
integer not null, foreign key (idA) references A);

insert into A values (1, 'Parana');
insert into B values (2, 'Umuarama', 1);

drop table A;
 

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

Reply via email to