Delete by join

How can i delete the records from another table on the behalf of the records from from first table

Delete from second_table where ref_no=(SELECT ref_number FROM first_table WHERE category =7 AND subcat1 =85)

DELETE second_table
  FROM first_table
INNER
  JOIN second_table 
    ON second_table.ref_no = first_table.ref_number 
 WHERE first_table.category = 7 
   AND first_table.subcat1 = 85

Thank you very much :slight_smile: