Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email firstname.lastname@example.org
Date: Wed Feb 20 2008 - 06:43:50 CST
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
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 the related row in table_b, if it is ONLY related to
the a_id of 5.
In other words, I want to delete the row from table b, but I don't
want to delete a row from table b that is in use by another row in
I'm thinking some type of subquery could do this, but I'm not sure.
Can some one tell me how to do this?
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql