There are some sales that no longer exist and I want to delete the installments that were made with those nonexistent sales, my code was this:
DELETE Abonos_Creditos
FROM Abonos_Creditos ac
LEFT JOIN Venta_Gas vg
ON ac.id_credito=vg.idVenta
WHERE ac.id_credito is null;
And I get the following error:
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
Does anyone know what is the correct way to execute this sentence?