DELETE f.* FROM FILE f, topic t, course c WHERE f.topic_id = t.topic_id AND t.course_id = 28;
DELETE t.* FROM topic t WHERE t.course_id = 28;
DELETE c.* FROM course c WHERE c.course_id = 28;
EDIT: The op wants to know (as indicated in the comments that clarified the question) that he would like to delete rows in all three tables where they share an id... essentially a cascading delete across three tables.