How do I perform an update at the same time on two different tables?
I have a table named Tarefa
and another called VinculoReferencia
, both have the field Taridinclusao
where is this field that needs to be updated at the same time, and the TarID
field, which is the reference of the tables.
In the query below is a simple update if it were to update only in the vinculoreferencia
table, but also when updating this, also update in the task table in the taridinclusao
field:
update vinculoreferencia set taridinclusao = 168228 where tarid = 168261.