Update two columns of two tables using inner join I have two tables in which there are two common columns (isActive &amp; group_id)
I want to update the isActive column of two table joining the group_id.

This is the query I tried but it shows error.

UPDATE A set isActive = 0, B.isActive = 0
from OperatorGrouping A   
inner join OperatorGroupingSteps B 
on A.group_id = B.group_id   
where A.group_id = 9
You should break your UPDATE statements into two parts

--Update A
    UPDATE A
      SET 
          A.isActive = 0
    FROM OperatorGrouping A
         INNER JOIN OperatorGroupingSteps B ON A.group_id = B.group_id
    WHERE A.group_id = 9;
--Update B
    UPDATE B
      SET 
          B.isActive = 0
    FROM OperatorGroupingSteps B
         INNER JOIN OperatorGrouping AB ON B.group_id = A.group_id
    WHERE A.group_id = 9;