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?
Interviews1 answer
How many update commands we need to issue to update data in related tables?
1 Answer
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
SwapnilPosted Jul 3, 2020, 8:38 PM EDT