db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Preben Mikael Bohn <pre...@chin.dk>
Subject Delete with cascade...
Date Thu, 22 Oct 2009 08:46:11 GMT
Hi all

I'm trying to delete all entries from a bunch of tables in my
database; from the reference manual it seems that the DELETE statement
cannot do cascading operations. So when I try to delete tables where I
have foreign key constraints I get an error like

"DELETE on table 'foo caused a violation of foreign key constraint
'bar' for key (196608).  The statement has been rolled back."

In postgres I simply do "TRUNCATE TABLE tablename CASCADE"; is there
something similar in Derby?

Best regards Preben

View raw message