sql delete row if exists in another table