DELETE devis.* FROM devis 
LEFT JOIN clients ON `devis`.societe = `clients`.societe and `devis`.cd_cli = `clients`.cd_cli
 WHERE clients.cd_cli Is Null




DELETE dem_devis.* FROM dem_devis
LEFT JOIN clients ON dem_devis.societe = `clients`.societe and dem_devis.cd_cli = `clients`.cd_cli
 WHERE clients.cd_cli Is Null



DELETE ordres.* FROM ordres
LEFT JOIN clients ON ordres.societe = `clients`.societe and ordres.cd_cli = `clients`.cd_cli
 WHERE clients.cd_cli Is Null



DELETE facture.* FROM facture
LEFT JOIN clients ON facture.societe = `clients`.societe and facture.cd_cli = `clients`.cd_cli
 WHERE clients.cd_cli Is Null



DELETE proforma.* FROM proforma
LEFT JOIN clients ON proforma.societe = `clients`.societe and proforma.cd_cli = `clients`.cd_cli
 WHERE clients.cd_cli Is Null



DELETE rdvous.* FROM rdvous
LEFT JOIN clients ON rdvous.societe = `clients`.societe and rdvous.cd_cli = `clients`.cd_cli
 WHERE clients.cd_cli Is Null


DELETE liv_bnq.* FROM liv_bnq
LEFT JOIN clients ON liv_bnq.societe = `clients`.societe and liv_bnq.cd_cli = `clients`.cd_cli
 WHERE clients.cd_cli Is Null

