Quel est l'equivalent d'un Update via 2 tables sous MySQL?

Quel est l'equivalent d'un Update via 2 tables sous MySQL? - SQL/NoSQL - Programmation

Marsh Posté le 15-03-2005 à 15:05:09    

Salut:
Voila mon code SQL SERVER:

Code :
  1. Update admin_client2
  2. set
  3. id=admin_client.id,
  4. pseudo=admin_client.pseudo,
  5. mdp=admin_client.mdp,
  6. adresse=admin_client.adresse,
  7. ville=admin_client.ville,
  8. portable=admin_client.portable,
  9. tel=admin_client.tel,
  10. nom=admin_client.nom,
  11. prenom=admin_client.prenom,
  12. cp=admin_client.cp,
  13. civilite=admin_client.civilite,
  14. visible=admin_client.visible,
  15. mailist=admin_client.mailist,
  16. valide=admin_client.valide
  17. from admin_client,admin_client2
  18. where admin_client2.mail=admin_client.mail;


 
J update ma table a partir d'une autre, c'est koi la syntaxe equivalente sous MySQL?

Reply

Marsh Posté le 15-03-2005 à 15:05:09   

Reply

Marsh Posté le 15-03-2005 à 15:07:08    

Voila l'equivalent :)

Code :
  1. Update admin_client2,admin_client
  2. set
  3. admin_client2.id=admin_client.id,
  4. admin_client2.pseudo=admin_client.pseudo,
  5. admin_client2.mdp=admin_client.mdp,
  6. admin_client2.adresse=admin_client.adresse,
  7. admin_client2.ville=admin_client.ville,
  8. admin_client2.portable=admin_client.portable,
  9. admin_client2.tel=admin_client.tel,
  10. admin_client2.nom=admin_client.nom,
  11. admin_client2.prenom=admin_client.prenom,
  12. admin_client2.cp=admin_client.cp,
  13. admin_client2.civilite=admin_client.civilite,
  14. admin_client2.visible=admin_client.visible,
  15. admin_client2.mailist=admin_client.mailist,
  16. admin_client2.valide=admin_client.valide
  17. where admin_client2.mail=admin_client.mail;

Reply

Marsh Posté le 15-03-2005 à 15:24:11    

temps de réponse : 1 min. 59 sec
 

Reply

Sujets relatifs:

Leave a Replay

Make sure you enter the(*)required information where indicate.HTML code is not allowed