Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 31283 invoked from network); 22 Oct 2009 08:47:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 22 Oct 2009 08:47:00 -0000 Received: (qmail 6978 invoked by uid 500); 22 Oct 2009 08:46:59 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 6934 invoked by uid 500); 22 Oct 2009 08:46:58 -0000 Mailing-List: contact derby-user-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Discussion" Delivered-To: mailing list derby-user@db.apache.org Received: (qmail 6926 invoked by uid 99); 22 Oct 2009 08:46:58 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Oct 2009 08:46:58 +0000 X-ASF-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_00 X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of preben@chin.dk designates 209.85.217.211 as permitted sender) Received: from [209.85.217.211] (HELO mail-gx0-f211.google.com) (209.85.217.211) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Oct 2009 08:46:53 +0000 Received: by gxk3 with SMTP id 3so1144723gxk.15 for ; Thu, 22 Oct 2009 01:46:31 -0700 (PDT) MIME-Version: 1.0 Received: by 10.101.195.34 with SMTP id x34mr5083444anp.175.1256201191411; Thu, 22 Oct 2009 01:46:31 -0700 (PDT) From: Preben Mikael Bohn Date: Thu, 22 Oct 2009 10:46:11 +0200 Message-ID: <4b2b9b730910220146v401a5070xeaaa97f4ce3136e4@mail.gmail.com> Subject: Delete with cascade... To: derby-user@db.apache.org Content-Type: text/plain; charset=ISO-8859-1 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