Kód:
DELETE scans_src FROM pictures RIGHT JOIN scans_src ON pictures.id_scans_src = scans_src.id WHERE pictures.id = NULL ;
tak trochu strelba od boku