Date: Thu, 21 Feb 2008 06:02:53 -0800 (PST)
Say I have two tables:
a_id (primary key)
b_id (primary key)
there is a one to many mapping between rows in table b and rows in table a.
Say I had an Id of a row in table a an (a_id, say 5). Now, what I want to do, is delete the row in table_a (easy enough), but I also want to delete related rows in table_b, if they are ONLY related to the a_id of 5.
In other words, I want to delete the row from table b (related to
a_id), but I don't
want to delete the row from table b that may be in use by another row in
How could I construct a query (or 2) to do that? Received on Thu Feb 21 2008 - 08:02:53 CST