MySQL : mémo perso : Nettoyage en pré-production
DELETE FROM INTERNETPROPOSANT WHERE IDPARTENAIRE<>578;
DELETE FROM INTERNETEMPRUNT WHERE IDINTERNETPROPOSANT
NOT IN (SELECT ID FROM INTERNETPROPOSANT);
DELETE FROM INTERNETEMPRUNTDECISIONMEDICALE WHERE
IDINTERNETEMPRUNT NOT IN (SELECT ID FROM INTERNETEMPRUNT);
UPDATE `INTERNETPROPOSANT`,`INTERNETEMPRUNT`
SET `INTERNETPROPOSANT`.`NOM`=
CONCAT_WS(",","NOM",
`INTERNETPROPOSANT`.`REFERENCEEXTERNE`,
`INTERNETEMPRUNT`.`NO_CONTRAT`),
`INTERNETPROPOSANT`.`PRENOM`=NULL,
`INTERNETPROPOSANT`.`NOTELEPHONE1`=NULL,
`INTERNETPROPOSANT`.`NOTELEPHONE2`=NULL,
`INTERNETPROPOSANT`.`NOTELEPHONE3`=NULL,
`INTERNETPROPOSANT`.`ADRESSE1`=NULL,
`INTERNETPROPOSANT`.`ADRESSE1`=NULL,
`INTERNETPROPOSANT`.`ADRESSE2`=NULL,
`INTERNETPROPOSANT`.`MOTDEPASSE`=NULL,
`INTERNETPROPOSANT`.`EMAIL`="monemailperso@gmail.com"
WHERE (`INTERNETPROPOSANT`.`ID` = `INTERNETEMPRUNT`.`IDINTERNETPROPOSANT`);