Let’s say I have a subtable called result.
SELECT school, grade
FROM (SELECT school, grade
FROM simulated_records
LIMIT 10) as result
How would i update the columns of this subtable? I tried:
UPDATE result
SET grade = 'A'
…but I get an error.
sub*selects* are temporary, they can’t be updated. It sounds like you want a temporary table
EDIT: re your comment:
The above uses the UPDATE FROM table operation using a subselect
EDIT 2: for second comment:
Assuming you don’t have a typo maybe you have an old version. There’s an alternative way to do this with better support: