Good question. I had a suspicion, but went ahead and tested this. Suspicion was wrong.
Altering the Activity DOES change the running automation containing the query.
reproduction:
this is recordsWithA data Extension
the recordsWithB DE is the same, just contains a "B" record.
A third DE result has the same structure, but no records.
Pre-run:
Run this query once.
SELECT
subscriberKey
FROM
recordsWithA
/* overwrite result */
From this you get the "A" record in the "result" DE:
Actual test.
schedule the automation with the "recordsWithA" query for "in two minutes".
in the meantime, go to activities.
change the sql activity to pull records from "recordsWithB", not touching the automation in "overview".
SELECT
subscriberKey
FROM
recordsWithB
/* overwrite result */
After two minutes, go to Automation Overview.
Double check that your Automation ran for the second time:
Check the result DE - The result is now B: