Hello, I am just trying to understand the logic behind this. Below are two example tables.
I want to update TEAM so any name that appears in REF is updated to Red.
Here is the query:
SET COLOR = 'Red'
WHERE NAME IN (
SELECT PEOPLE FROM REF
Note that PEOPLE is not a valid column in REF. If you run the nested select query it will bring an error. However, if you run the entire update statement, it will update ALL records to Red.
Can anyone explain the logic behind this?