Other can correct me if I'm wrong, but you can simply not drop a table that has a constraint to foreign keys (thus my previous email with the code to set the referential integrity to false), but being able to drop a table with a primary key and NO referential to the primary key in your database is the way it works. I'm coming from Oracle and this is the way it is done there.
Kind Regards, Nitai On Wed, Jan 20, 2010 at 12:23 PM, johnstok <[email protected]> wrote: > I have at least got to the bottom of the problem. There is another > foreign key constraint for that table: > > alter table user_roles add constraint FK_USERROLES_USER_ID foreign key > (user_id) references users; > > If I drop this then the original DROP PRIMARY KEY statement will work. > > This seems a bit wrong - is it a bug? > > -- > 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. > > > > -- See for yourself how easy it is to manage files today. Join the revolution! Razuna SaaS On-Demand - Hosted Digital Asset Management Solution http://www.razuna.com/ Razuna - Open Source Digital Asset Management http://www.razuna.org/ Follow us on Twitter http://twitter.com/razunahq
-- 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.
