我想更新一个只有两个字段 test_set_id 和 plan_id 的表,我可以从这个查询中轻松获得
SELECT tp.plan_id
, r.release_id
FROM test_plan tp
, releases r
, test_run tr
, iteration i
WHERE tr.iteration_id = i.iteration_id
AND i.release_id = r.release_id
AND tr.plan_id = tp.plan_id
AND i.release_id = 1
GROUP BY plan_id
但是当我运行以下查询时,它给了我一个 sql 错误。
UPDATE test_set_relation
SET test_set_id
, plan_id=
( SELECT tp.plan_id
, r.release_id
FROM test_plan tp
, releases r
, test_run tr
, iteration i
WHERE tr.iteration_id = i.iteration_id
AND i.release_id = r.release_id
AND tr.plan_id = tp.plan_id
AND i.release_id = 1
GROUP BY plan_id
)
我该如何解决这个问题?