Ayuda. Update inner join | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
0

Ayuda. Update inner join

Update productos set origen = 44 where productos.id in (select productos.id from productos inner join temp_productos on productos.id=temp_productos.id;

8th Feb 2020, 6:38 PM
Luis
Luis - avatar
3 Antworten
0
MySQL error. "Hoy cant specify target table productos for update un from Claude
8th Feb 2020, 6:46 PM
Luis
Luis - avatar
0
I doubt if you can do that. Joins are used to combine the matching or non matching results from two tables depending upon the join used. Why don't you set that value separately for both the tables. Just a suggestion.
8th Feb 2020, 7:06 PM
Avinesh
Avinesh - avatar
0
Explico lo que necesito. Tengos tablas. Una temporal con datos anteriores y otra con datos actualizados. Las tablas son iguales. Quiero actualizar poner a '1' campo_existe si el id está en ambas tablas o en la tabla temporal. Necesito saber el código. Gracias.
10th Feb 2020, 7:43 AM
Luis
Luis - avatar