Hi,
update two tables with join and where condition
i need two tables update and with 1 condition. Example table1 and table2 with 1 condition.
how write query?
any idea!
i get this error for my query.Here how to modified query?
update ps set
PurposeOfVisit=@purposeofvisit,
p.IsBanned=@isbanned
from [PersonSessions] ps
inner join person as p on p.id=ps.visitorid
where ps.Id = @id
Here pass the value like that field.
update ps set
PurposeOfVisit='interview',
p.IsBanned=false
from [PersonSessions] ps
inner join person as p on p.id=ps.visitorid
where ps.Id = 4
how to update two tables join with where condition