MySQL Selecting and deleting whole entries
MySQL's DELETE syntax requires the table names involved in the DELETE.

However, I don't think the SELECT query is working as you want it to, either.

You have not established any connection between Songlist and Categorylist. So, it's going to give you a cross join - every row in Songlist wit the specified Artist and Title, matched with every row in Categorylist where CategoryID is not 12. If you had two matching rows in Songlist, and 11 matching rows in Categorylist, your result would be 22 rows.

Assuming you have a CategoryID in Songlist, you'd presumably want rows where the Songlist.CategroyID is not 12.

Try this:

Select Songlist.ID,Artist,Title,Filename,CategoryList.CategoryID 
  from Songlist
         LEFT OUTER JOIN Categorylist ON (Songlist.CategoryID = Categorylist.CategoryID)
 where Artist = "Lady Gaga"
   AND Title = "Bad Romance"
   AND (   Categorylist.CategoryID IS NULL
        OR Songlist.CategoryID &lt;&gt; 12
       )
;


This should find all records with your artist and title, where either there's no record in Categorylist with the CategoryID in Songlist, or where the CategoryID is something other than 12.

Then, the delete statement to delete those records from Songlist would be:

DELETE Songlist
  FROM Songlist
         LEFT OUTER JOIN Categorylist ON (Songlist.CategoryID = Categorylist.CategoryID)
 where Artist = "Lady Gaga"
   AND Title = "Bad Romance"
   AND (   Categorylist.CategoryID IS NULL
        OR Songlist.CategoryID &lt;&gt; 12
       )
;


Presumably, leaving only any rows with that artist and title where the CategoryID is 12.

NOTE: Code is, obviously, untested.