Re: [GENERAL] Efficiently delete rows not referenced by a foreign key

2014-03-03 Thread David Johnston
Evan Martin wrote > Hi All, > > I have a database schema where if row is deleted from one table the rows > it references in another table should also be deleted, unless still > referenced by something else. > > Eg. Table A has foreign key to table B. When I delete a row from A I > also want to

[GENERAL] Efficiently delete rows not referenced by a foreign key

2014-03-03 Thread Evan Martin
Hi All, I have a database schema where if row is deleted from one table the rows it references in another table should also be deleted, unless still referenced by something else. Eg. Table A has foreign key to table B. When I delete a row from A I also want to delete the referenced row in B,