Consider that we have two tables. One parent table assume it has 5 records and, the child table has 10 records. In order to perfom an update of the missing data/values in the child table how many update statements do we need to execute?
Loading
Consider that we have two tables. One parent table assume it has 5 records and, the child table has 10 records. In order to perfom an update of the missing data/values in the child table how many update statements do we need to execute?
Single update command in join
Using right join in update query it’s possible, from below example you can work around
UPDATE Child SET ChildCOl = value
FROM Child as C
RIGHT JOIN Paraent as P
ON C.Col = P.Col
WHERE P.COL IS NULL