Re: [SQL] Deleting entries from multiple tables

2010-11-30 Thread Dusan Misic
To be precise, if you used defaults, you can't delete any row in table A that has rows referencing to it in tables B and C. On Tue, Nov 30, 2010 at 6:59 AM, manidegr8 wrote: > > i am trying to run a query but its not working may be due to constraint > conflicts > > i have table A, B and C > B an

Re: [SQL] Deleting entries from multiple tables

2010-11-30 Thread Dusan Misic
What is ON DELETE part of the foreign key constraint? If you set it to CASCADE, then your delete from the parent table will cascade to child tables (to put it simpler, when you delete record in table A, then PostgreSQL will delete any rows in tables B and C that are referencing original row (or co