I have the following SQL:
SELECT prospect.uni_id, prospect.usu_id, prospect.pro_nome, prospect_agendamento.* FROM prospect_agendamento JOIN prospect ON(prospect.pro_id=prospect_agendamento.age_id_prospect) WHERE prospect_agendamento.age_cod_consultora_agendado = '4'
In this, I bring the results that I need. I need to execute the following UPDATE within that query:
UPDATE prospect_agendamento SET age_cod_consultora_agendado=prospect.usu_id
How can I execute one query within another?
I need to set the usu_id that is in the prospect table, to the age_cod_addressed in the prospect_address table, leave equal