Original Post
Hello all, I'm quite the newbie with SQl but so far I've been getting along pretty well with it. However, what I can't figure out is how to select (or in my case, delete) multiple rows from multiple tables if one or more of those tables do not meet the requirements. Perhaps that was a little cryptic. Here's what I have so far: SELECT abilities.name, rel_ability_keyword.type, rel_ability_user.user_id, rel_ability_asset_type.asset_type_id FROM abilities LEFT JOIN rel_ability_keyword USING (ability_id) LEFT JOIN rel_ability_user USING (ability_id) LEFT JOIN rel_ability_asset_type USING (ability_id) WHERE abilities.ability_id = 2 So basically I want to delete the ability which will always exist. The ability table is related to the keywords, users, and asset_types tables. These three relation tables may have any number of rows that need to be deleted - but here's where my join gets screwed up: the tables may not have any rows that need to be deleted at all. So, if the keyword relation table has nothing to be deleted, I can't delete anything from the user or asset_type relation either, even though they most likely have something that needs to be deleted. Is there anyway I can apply 3 joins independent of each other to a single table? I've tried googling but I don't really know what I want, hah. I'm running MySQL 4.0.22 by the way.